Skip to content

Commit 29a80a7

Browse files
committed
Исправлены допустимые имена переменных
1 parent b6d3c30 commit 29a80a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/annimon/ownlang/parser/Lexer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public final class Lexer {
4444
OPERATORS.put("!=", TokenType.EXCLEQ);
4545
OPERATORS.put("<=", TokenType.LTEQ);
4646
OPERATORS.put(">=", TokenType.GTEQ);
47-
47+
4848
OPERATORS.put("&&", TokenType.AMPAMP);
4949
OPERATORS.put("||", TokenType.BARBAR);
5050

@@ -73,7 +73,7 @@ public List<Token> tokenize() {
7373
while (pos < length) {
7474
final char current = peek(0);
7575
if (Character.isDigit(current)) tokenizeNumber();
76-
else if (Character.isLetter(current)) tokenizeWord();
76+
else if (Character.isJavaIdentifierStart(current)) tokenizeWord();
7777
else if (current == '"') tokenizeText();
7878
else if (current == '#') {
7979
next();

0 commit comments

Comments
 (0)