aboutsummaryrefslogtreecommitdiff
path: root/lexer.py
diff options
context:
space:
mode:
authormryouse2022-05-23 04:00:35 +0000
committermryouse2022-05-23 04:00:35 +0000
commitf68911f70a666cf5b11ebe47a4f07c7fe343c01b (patch)
treeb590471d624933b1e3c9686289a820d11ae6b9fc /lexer.py
parent5e788bc00a600b87a14e79c57a4d57bc9fb20fcb (diff)
lex comments (ignore them)
Diffstat (limited to 'lexer.py')
-rw-r--r--lexer.py5
1 files changed, 5 insertions, 0 deletions
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: