Forced the exlamation mark as a postfix operator
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user