Discard line continuations

- Fixes #54
This commit is contained in:
Dustin Spicuzza
2023-07-23 17:00:35 -04:00
parent 9bf99db87b
commit b07e1f81a6
3 changed files with 33 additions and 4 deletions

View File

@@ -659,7 +659,12 @@ class LexerTokenStream(TokenStream):
tokbuf.append(tok)
if tok.type == "NEWLINE":
break
# detect/remove line continuations
if len(tokbuf) > 2 and tokbuf[-2].type == "\\":
tokbuf.pop()
tokbuf.pop()
else:
break
# detect/combine user defined literals
if tok.type in udl_start: