From 1422d647cddb577fafc19ee97e33a394aefc560b Mon Sep 17 00:00:00 2001 From: Elias Haugsbakk Date: Sun, 20 Sep 2026 03:12:03 +0200 Subject: add rules to semantics analyzer --- src/main/java/no/eliashaugsbakk/kompilator/tokenization/Lexer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/no/eliashaugsbakk/kompilator/tokenization/Lexer.java') diff --git a/src/main/java/no/eliashaugsbakk/kompilator/tokenization/Lexer.java b/src/main/java/no/eliashaugsbakk/kompilator/tokenization/Lexer.java index d705ca5..9e9ebfd 100644 --- a/src/main/java/no/eliashaugsbakk/kompilator/tokenization/Lexer.java +++ b/src/main/java/no/eliashaugsbakk/kompilator/tokenization/Lexer.java @@ -66,7 +66,7 @@ public class Lexer { } tokens.add(new Token(EOF, "End of File", line, column)); - tokens.forEach(token -> IO.println(token.type().toString() + ": " + token.value())); + //tokens.forEach(token -> IO.println(token.type().toString() + ": " + token.value())); return tokens; } @@ -131,7 +131,7 @@ public class Lexer { } private void inWord() { - if (Character.isWhitespace(current) || current == ':' || current == '(' || current == ')') { + if (!isWordCharacter(current)) { state = NORMAL; characterizeWord(); } else { -- cgit v1.2.3