Added struct parsing support to `parse` (for top-evel parsing)
parent
017ef66d81
commit
5cee963957
|
@ -1116,6 +1116,14 @@ public final class Parser
|
||||||
/* Add the class definition to the program */
|
/* Add the class definition to the program */
|
||||||
modulle.addStatement(clazz);
|
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
|
else
|
||||||
{
|
{
|
||||||
expect("parse(): Unknown '" ~ tok.getToken() ~ "'");
|
expect("parse(): Unknown '" ~ tok.getToken() ~ "'");
|
||||||
|
|
|
@ -30,7 +30,10 @@ class kl
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct structTest
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class Shekshi
|
class Shekshi
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue