diff --git a/compiler/lexer.py b/compiler/lexer.py index 4c9feba..603b429 100644 --- a/compiler/lexer.py +++ b/compiler/lexer.py @@ -39,7 +39,7 @@ class Tokens(enum.Enum): KwLet = re.compile(r"\blet\b") - Identifier = re.compile(r"[a-zA-Z_][a-zA-Z_0-9]*") + Identifier = re.compile(r"\b[a-zA-Z_][a-zA-Z_0-9]*\b") Equal = re.compile(r"=") Colon = re.compile(r":")