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
|
tk.Sym = SymChangeSign
|
||||||
} else if tk.Sym == SymPlus {
|
} else if tk.Sym == SymPlus {
|
||||||
tk.Sym = SymUnchangeSign
|
tk.Sym = SymUnchangeSign
|
||||||
|
} else if tk.IsSymbol(SymExclamation) {
|
||||||
|
err = tk.Errorf("postfix opertor %q requires an operand on its left", tk)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
firstToken = false
|
firstToken = false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user