WIP: If statement parsing seems to work and pick up some errors
This commit is contained in:
parent
bbe52bb287
commit
70bdeed89b
|
@ -127,7 +127,7 @@ public final class Parser
|
|||
nextToken();
|
||||
|
||||
/* Check if we have an `if` after the `{` (so an "else if" statement) */
|
||||
if (getSymbolType(getCurrentToken()) == SymbolType.IF && !reachedElse)
|
||||
if (getSymbolType(getCurrentToken()) == SymbolType.IF)
|
||||
{
|
||||
/* Pop off the `if` */
|
||||
nextToken();
|
||||
|
|
|
@ -26,7 +26,23 @@ class clazz_2_1
|
|||
{
|
||||
print("Hello");
|
||||
}
|
||||
|
||||
else if(1)
|
||||
{
|
||||
print("Bruh");
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Bhjkfd");
|
||||
}
|
||||
|
||||
if(1)
|
||||
{
|
||||
print("Hello");
|
||||
}
|
||||
else if(1)
|
||||
{
|
||||
print("Bruh");
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Bhjkfd");
|
||||
|
|
Loading…
Reference in New Issue