From 2cb992bfd4fea07fcdb3df1b9ffe1e11d34c70f3 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Sat, 2 Nov 2024 09:55:58 -0400 Subject: [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 --- test.q | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test.q') diff --git a/test.q b/test.q index 6e92c35..dbdd857 100644 --- a/test.q +++ b/test.q @@ -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; -}; +} -- cgit v1.2.3