Added some notes on refactoring the statement parsing system
This commit is contained in:
parent
ffa94ba6e5
commit
14aafe7097
|
@ -261,7 +261,19 @@ public final class Parser
|
||||||
/* Get the next token */
|
/* Get the next token */
|
||||||
nextToken();
|
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
|
else
|
||||||
{
|
{
|
||||||
gprintln("parseExpression(): NO MATCH", DebugType.ERROR);
|
gprintln("parseExpression(): NO MATCH", DebugType.ERROR);
|
||||||
|
@ -330,6 +342,19 @@ public final class Parser
|
||||||
gprintln("ParseTypedDec: Je suis fini");
|
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()
|
private void parseFuncCall()
|
||||||
{
|
{
|
||||||
gprintln("parseFuncCall(): Doing function call parsing");
|
gprintln("parseFuncCall(): Doing function call parsing");
|
||||||
|
|
Loading…
Reference in New Issue