feat: Implement while loops

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

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')