Allow "_" characters in identifiers
This commit is contained in:
parent
ca07ff1208
commit
a16e4ef4b2
|
@ -3,7 +3,7 @@ using namespace std;
|
|||
using enum tok::type;
|
||||
|
||||
tok::type getIdentifierCharType(const char& Char) {
|
||||
if (isalpha(Char)) return IDENTIFIER;
|
||||
if (isalpha(Char) || Char == '_') return IDENTIFIER;
|
||||
else if (isdigit(Char)) return NUMBER;
|
||||
else if (Char == STRING) return STRING;
|
||||
else return UNEXPECTED;
|
||||
|
|
Loading…
Reference in New Issue