LADX: apworld (#1665)

This commit is contained in:
zig-for
2023-04-06 11:06:34 -07:00
committed by GitHub
parent eef8f7af1a
commit ece6598b09
6 changed files with 22 additions and 17 deletions

View File

@@ -115,8 +115,8 @@ class Tokenizer:
assert kind is not None
value: Union[str, int] = mo.group()
if kind == 'MISMATCH':
print(code.split("\n")[line_num-1])
raise RuntimeError("Syntax error on line: %d: %s\n%s", line_num, value)
line = code.split("\n")[line_num - 1]
raise RuntimeError(f"Syntax error on line: {line_num}: {kind}:`{line}`")
elif kind == 'SKIP':
pass
elif kind == 'COMMENT':