diff options
author | Quinn Stephens <quinn@osmora.org> | 2024-11-02 09:55:58 -0400 |
---|---|---|
committer | Quinn Stephens <quinn@osmora.org> | 2024-11-02 09:55:58 -0400 |
commit | 2cb992bfd4fea07fcdb3df1b9ffe1e11d34c70f3 (patch) | |
tree | b6a9c13b291c09151ee87e2b2dbac979c6254de3 /test.q | |
parent | fc26be4293b03cac62d6db7bb597d0c8cf1d5b3a (diff) |
[parser] Improve error handling
parse_enum() and parse_struct() now free all allocated memory in case of
an error. They also no longer allow the type to be registered if an
error occurs.
parse_type() no longer allows/requires semicolons after enum/struct
definitions.
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Diffstat (limited to 'test.q')
-rw-r--r-- | test.q | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -5,7 +5,7 @@ type EfiGuid: struct { uint32 data1; uint16 data2; uint16 data3; -}; +} type EfiTableHeader: struct { uint64 signature; @@ -13,20 +13,20 @@ type EfiTableHeader: struct { uint32 headerSize; uint32 crc32; uint32 reserved; -}; +} type EfiRuntimeServices: struct { EfiTableHeader hdr; -}; +} type EfiBootServices: struct { EfiTableHeader hdr; -}; +} type EfiConfigurationTable: struct { EfiGuid vendorGuid; any* vendorTable; -}; +} type EfiSystemTable: struct { EfiTableHeader hdr; @@ -46,4 +46,4 @@ type EfiSystemTable: struct { uint numberOfTableEntries; EfiConfigurationTable* configurationTable; -}; +} |