From 8286580ef27d1434c3c2c52e71f19b4a42ec19cf Mon Sep 17 00:00:00 2001 From: mryouse Date: Sat, 18 Jun 2022 01:47:06 +0000 Subject: make LexError a NebPanic, and fix lexing errors with :bools --- exceptions.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'exceptions.py') diff --git a/exceptions.py b/exceptions.py index 229ec88..8bbe000 100644 --- a/exceptions.py +++ b/exceptions.py @@ -8,3 +8,6 @@ class InterpretPanic(NebPanic): big_message += f" (got {arg})" super().__init__(big_message) +class LexError(NebPanic): + def __init__(self, message, line): + super().__init__(f"line {line}: {message}") -- cgit v1.2.3