new prefix operator "!" as logic NOT

This commit is contained in:
2025-01-04 17:47:59 +01:00
parent 760c1ee6da
commit 6b3351b324
2 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -444,8 +444,7 @@ func (parser *parser) parseGeneral(scanner *scanner, ctx parserContext, termSymb
} else if tk.IsSymbol(SymStar) {
tk.SetSymbol(SymDereference)
} else if tk.IsSymbol(SymExclamation) {
err = tk.Errorf("postfix opertor %q requires an operand on its left side", tk)
break
tk.SetSymbol(SymNot)
}
firstToken = false
}