Added `new` keyword

This commit is contained in:
Tristan B. Kildaire 2021-06-09 12:43:59 +02:00
parent 7b55eebf94
commit c24b19bc0a
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ public enum SymbolType
OCURLY,
CCURLY,
MODULE,
NEW,
IF,
ELSE,
WHILE,
@ -307,6 +308,11 @@ public SymbolType getSymbolType(Token tokenIn)
{
return SymbolType.MODULE;
}
/* new keyword */
else if(cmp(token, "new") == 0)
{
return SymbolType.NEW;
}
/* An identifier/type (of some sorts) - further inspection in parser is needed */
else if(isPathIdentifier(token) || isIdentifier(token))
{