Append Statement objects to build up struct's body
parent
bf48ee7b83
commit
13645f6b6b
|
@ -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;
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue