Added unittest for identifiers
parent
bfdbaaeee7
commit
2b7dd2fce3
|
@ -317,4 +317,15 @@ unittest
|
||||||
|
|
||||||
symbol = getSymbolType(new Token("2121a", 0, 0));
|
symbol = getSymbolType(new Token("2121a", 0, 0));
|
||||||
assert(symbol != SymbolType.NUMBER_LITERAL);
|
assert(symbol != SymbolType.NUMBER_LITERAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Test: Identifer tests */
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
SymbolType symbol = getSymbolType(new Token("_yolo2", 0, 0));
|
||||||
|
assert(symbol == SymbolType.IDENTIFIER);
|
||||||
|
|
||||||
|
symbol = getSymbolType(new Token("2_2ff", 0, 0));
|
||||||
|
assert(symbol != SymbolType.IDENTIFIER);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue