Selector operator, multi-operand, added

This commit is contained in:
2024-04-08 22:16:07 +02:00
parent f74e523617
commit d3f388f7e1
10 changed files with 263 additions and 34 deletions
+5 -1
View File
@@ -144,7 +144,11 @@ func (self *scanner) fetchNextToken() (tk *Token) {
case ',':
tk = self.makeToken(SymComma, ch)
case ':':
tk = self.makeToken(SymColon, ch)
if next, _ := self.peek(); next == ':' {
tk = self.moveOn(SymDoubleColon, ch, next)
} else {
tk = self.makeToken(SymColon, ch)
}
case ';':
tk = self.makeToken(SymSemiColon, ch)
case '.':