scanner: disabled prefix operator '()'

This commit is contained in:
2024-07-13 18:10:04 +02:00
parent 00fda29606
commit 234759158c
2 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -269,11 +269,11 @@ func (scanner *scanner) fetchNextToken() (tk *Token) {
tk = scanner.makeToken(SymDollar, ch)
}
case '(':
if next, _ := scanner.peek(); next == ')' {
tk = scanner.moveOn(SymOpenClosedRound, ch, next)
} else {
// if next, _ := scanner.peek(); next == ')' {
// tk = scanner.moveOn(SymOpenClosedRound, ch, next)
// } else {
tk = scanner.makeToken(SymOpenRound, ch)
}
// }
case ')':
tk = scanner.makeToken(SymClosedRound, ch)
case '[':