Skip to content

Commit 0a52649

Browse files
committed
support '_' character in variable name
1 parent e62a5c8 commit 0a52649

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Lexer/Lexer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private char nextChar() {
6262
public Token next() {
6363
do {
6464
if (isLetter(ch)) { // ident or keyword
65-
String spelling = concat(letters + digits);
65+
String spelling = concat(letters + digits + "_");
6666
return Token.keyword(spelling);
6767

6868
} else if (isDigit(ch)) { // int or float literal

0 commit comments

Comments
 (0)