Added recursive brace parsing for parseExpression()

Updated test case to test it
This commit is contained in:
Tristan B. Kildaire 2021-03-15 11:29:05 +02:00
parent e5b86498f5
commit 18a5bdca16
2 changed files with 12 additions and 0 deletions

View File

@ -340,6 +340,16 @@ public final class Parser
* TODO: For recursive () in expressions I might need to stop the `)` detection outside
* of the call to parseExpression (the original call)
*/
else if(symbol == SymbolType.LBRACE)
{
nextToken();
parseExpression();
nextToken();
}
else
{
//gprintln("parseExpression(): NO MATCH", DebugType.ERROR);

View File

@ -42,6 +42,8 @@ void main(int hello, byte d)
ubyte eish = 1+1;
ubyte poes = ((1+1));
if(1+1)
{
if(1)