Added more keywords

expression_parsing.sync-conflict-20210316-090018-O3W7KWN
Tristan B. V. Kildaire 2021-03-05 10:30:27 +02:00
parent a223045bb3
commit 5c37112f42
1 changed files with 21 additions and 0 deletions

View File

@ -37,6 +37,9 @@ public enum SymbolType
PUBLIC, PUBLIC,
PRIVATE, PRIVATE,
STATIC, STATIC,
CASE,
GOTO,
DO,
UNKNOWN UNKNOWN
} }
@ -169,6 +172,24 @@ public static SymbolType getSymbolType(Token tokenIn)
{ {
return SymbolType.FOR; return SymbolType.FOR;
} }
/* case keyword */
else if(cmp(token, "case") == 0)
{
return SymbolType.CASE;
}
/* goto keyword */
else if(cmp(token, "goto") == 0)
{
return SymbolType.GOTO;
}
/* do keyword */
else if(cmp(token, "do") == 0)
{
return SymbolType.DO;
}
/* Identifier check (TODO: Track vars) */ /* Identifier check (TODO: Track vars) */
else if (isAlpha(token)) else if (isAlpha(token))