new operator ':=', it assigns a value to a variable by deep copy

This commit is contained in:
2026-05-17 05:02:07 +02:00
parent 08617378e0
commit 0c719025cd
9 changed files with 201 additions and 198 deletions
+2
View File
@@ -192,6 +192,8 @@ func (scanner *Scanner) fetchNextToken() (tk *Token) {
case ':':
if next, _ := scanner.peek(); next == ':' {
tk = scanner.moveOn(SymDoubleColon, ch, next)
} else if next == '=' {
tk = scanner.moveOn(SymColonEqual, ch, next)
} else {
tk = scanner.MakeToken(SymColon, ch)
}