Commit ad0db916 by Zachary Snow

support typedef forward declarations

parent 1a6e0ce9
...@@ -736,6 +736,11 @@ NonDeclPackageItem :: { [PackageItem] } ...@@ -736,6 +736,11 @@ NonDeclPackageItem :: { [PackageItem] }
| "import" PackageImportItems ";" { map (uncurry Import) $2 } | "import" PackageImportItems ";" { map (uncurry Import) $2 }
| "export" PackageImportItems ";" { map (Export . Just) $2 } | "export" PackageImportItems ";" { map (Export . Just) $2 }
| "export" "*" "::" "*" ";" { [Export Nothing] } -- "Nothing" being no restrictions | "export" "*" "::" "*" ";" { [Export Nothing] } -- "Nothing" being no restrictions
| ForwardTypedef ";" { $1 }
ForwardTypedef :: { [PackageItem] }
: "typedef" "enum" Identifier { [] }
| "typedef" "struct" Identifier { [] }
| "typedef" "union" Identifier { [] }
PackageImportItems :: { [(Identifier, Maybe Identifier)] } PackageImportItems :: { [(Identifier, Maybe Identifier)] }
: PackageImportItem { [$1] } : PackageImportItem { [$1] }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment