Append Statement objects to build up struct's body

develop.sync-conflict-20210606-150924-O3W7KWN
Tristan B. Kildaire 2021-05-31 18:14:15 +02:00
parent bf48ee7b83
commit 13645f6b6b
1 changed files with 3 additions and 2 deletions

View File

@ -298,6 +298,7 @@ public final class Parser
gprintln("parseStruct(): Enter", DebugType.WARNING);
Struct generatedStruct;
Statement[] statements;
/* Consume the `struct` that caused `parseStruct` to be called */
nextToken();
@ -325,7 +326,6 @@ public final class Parser
/* The possibly valid returned struct member (Entity) */
Statement structMember;
/** TODO:
* We only want to allow function definitions and variable
* declarations here (WIP: for now without assignments)
@ -379,7 +379,8 @@ public final class Parser
expect("Only function definitions and variable declarations allowed in struct body");
}
/* Append to struct's body */
statements ~= structMember;