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