feat: 添加取模运算符支持,更新解析器、解释器、词法分析器和相关示例以处理相关语法

This commit is contained in:
0264408
2026-06-16 09:36:32 +08:00
parent 259dcf1af9
commit bd052699f5
6 changed files with 33 additions and 3 deletions
+8
View File
@@ -96,6 +96,14 @@ impl Lexer {
}
}
'%' => {
if self.match_char('=') {
TokenKind::PercentEqual
} else {
TokenKind::Percent
}
}
'!' => {
if self.match_char('=') {
TokenKind::BangEqual