aboutsummaryrefslogtreecommitdiff
path: root/neb/lexer.py
diff options
context:
space:
mode:
Diffstat (limited to 'neb/lexer.py')
-rw-r--r--neb/lexer.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/neb/lexer.py b/neb/lexer.py
index b522460..22a9710 100644
--- a/neb/lexer.py
+++ b/neb/lexer.py
@@ -162,7 +162,9 @@ def get_type(data, line):
counter += 1
if counter >= len(data):
break
- if value not in types:
- raise LexError(f"unrecognized type {value}", line)
- return Token(types[value], value, None, line), counter - 1
+ if value in types:
+ typ = types[value]
+ else:
+ typ = TokenType.USER_TYPE
+ return Token(typ, value, None, line), counter - 1