Added Struct parsing support to paarseBody
Added a test to test it (in basic1.t)entity_declaration_type_checking
parent
ef3891530a
commit
688fc34969
|
@ -415,6 +415,12 @@ public final class Parser
|
||||||
/* Parse the class and add its statements */
|
/* Parse the class and add its statements */
|
||||||
statements ~= parseClass();
|
statements ~= parseClass();
|
||||||
}
|
}
|
||||||
|
/* If it is a struct definition */
|
||||||
|
else if(symbol == SymbolType.STRUCT)
|
||||||
|
{
|
||||||
|
/* Parse the struct and add it to the statements */
|
||||||
|
statements ~= parseStruct();
|
||||||
|
}
|
||||||
/* Error out */
|
/* Error out */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,11 +32,16 @@ class kl
|
||||||
|
|
||||||
struct structTest
|
struct structTest
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Shekshi
|
class Shekshi
|
||||||
{
|
{
|
||||||
|
struct structTest
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class Shekshi1
|
class Shekshi1
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue