diff --git a/hy/lex/__init__.py b/hy/lex/__init__.py index 8153aa8..f1a74aa 100644 --- a/hy/lex/__init__.py +++ b/hy/lex/__init__.py @@ -35,3 +35,7 @@ def tokenize(buf): pos = e.getsourcepos() raise LexException("Could not identify the next token.", pos.lineno, pos.colno) + except LexException as e: + if e.source is None: + e.source = buf + raise