feat: Implement while loops

This commit is contained in:
Alvin committed 2025-07-22 16:22:49 +02:00
1 parent f3e4be5949
commit 65e53daa66
4 files changed
+40 -1

No files matched your search

+3
View File
@@ -90,6 +90,9 @@ class Lexer:
if re.match(r'\bAndrogyny\b', self.text[self.pos:]):
self.pos += len('Androgyny')
return Token('ANDROGYNY', 'Androgyny')
if re.match(r'\bOtokonoko\b', self.text[self.pos:]):
self.pos += len('Otokonoko')
return Token('OTOKONOKO', 'Otokonoko')
if re.match(r'\bis\b', self.text[self.pos:]):
self.pos += 2
return Token('ASSIGN', 'is')