Compare commits

..

1 Commits

Author SHA1 Message Date
camoroso 0e55f83d56 Forced the exlamation mark as a postfix operator 2024-12-26 08:57:14 +01:00
+3
View File
@@ -441,6 +441,9 @@ func (parser *parser) parseGeneral(scanner *scanner, ctx parserContext, termSymb
tk.Sym = SymChangeSign
} else if tk.Sym == SymPlus {
tk.Sym = SymUnchangeSign
} else if tk.IsSymbol(SymExclamation) {
err = tk.Errorf("postfix opertor %q requires an operand on its left", tk)
break
}
firstToken = false
}