From f68911f70a666cf5b11ebe47a4f07c7fe343c01b Mon Sep 17 00:00:00 2001 From: mryouse Date: Mon, 23 May 2022 04:00:35 +0000 Subject: lex comments (ignore them) --- lexer.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lexer.py') diff --git a/lexer.py b/lexer.py index c2460eb..1f963cc 100644 --- a/lexer.py +++ b/lexer.py @@ -46,6 +46,11 @@ def lex(data): tokens = [] while current < end: char = data[current] + if char == ";": + while char != "\n" and current < end: + current += 1 + char = data[current] + continue if char == "\n": line += 1 if char in WHITESPACE: -- cgit v1.2.3