Added some notes on refactoring the statement parsing system

This commit is contained in:
Tristan B. Velloza Kildaire 2021-03-03 23:10:21 +02:00
parent ffa94ba6e5
commit 14aafe7097
1 changed files with 26 additions and 1 deletions

View File

@ -261,7 +261,19 @@ public final class Parser
/* Get the next token */
nextToken();
}
/* TODO: Add funcCal symbol type */
/* If it is an identifier */
else if(symbol == SymbolType.IDENTIFIER)
{
string identifier = getCurrentToken().getToken();
nextToken();
/* If the symbol is `(` then function call */
if(getSymbolType(getCurrentToken()) == SymbolType.LBRACE)
{
/* TODO: Implement function call */
}
}
else
{
gprintln("parseExpression(): NO MATCH", DebugType.ERROR);
@ -330,6 +342,19 @@ public final class Parser
gprintln("ParseTypedDec: Je suis fini");
}
private void parseStatement()
{
/* TODO: Implement parse statement */
/**
* TODO: We should remove the `;` from parseFuncCall
* And rather do the following here:
*
* 1. parseFuncCall()
* 2. expect(;)
*/
}
private void parseFuncCall()
{
gprintln("parseFuncCall(): Doing function call parsing");