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