Added struct parsing support to `parse` (for top-evel parsing)

entity_declaration_type_checking
Tristan B. Kildaire 2021-05-04 19:13:20 +02:00
parent 017ef66d81
commit 5cee963957
2 changed files with 11 additions and 0 deletions

View File

@ -1116,6 +1116,14 @@ public final class Parser
/* Add the class definition to the program */
modulle.addStatement(clazz);
}
/* If it is a struct definition */
else if(symbol == SymbolType.STRUCT)
{
Struct ztruct = parseStruct();
/* Add the struct definition to the program */
modulle.addStatement(ztruct);
}
else
{
expect("parse(): Unknown '" ~ tok.getToken() ~ "'");

View File

@ -30,7 +30,10 @@ class kl
}
struct structTest
{
}
class Shekshi
{