term.go: two error messages corrected
This commit is contained in:
parent
406bced450
commit
76e01f12d2
8
term.go
8
term.go
@ -62,8 +62,8 @@ func (s *term) Clone() (d *term) {
|
||||
}
|
||||
}
|
||||
d = &term{
|
||||
tk: *s.tk.Clone(),
|
||||
parent: s.parent,
|
||||
tk: *s.tk.Clone(),
|
||||
parent: s.parent,
|
||||
children: children,
|
||||
position: s.position,
|
||||
priority: s.priority,
|
||||
@ -211,11 +211,11 @@ func (term *term) checkOperands() (err error) {
|
||||
}
|
||||
case posPrefix:
|
||||
if term.children == nil || len(term.children) != 1 || term.children[0] == nil {
|
||||
err = term.tk.Errorf("prefix operator %q requires one not nil operand", term.tk.String())
|
||||
err = term.tk.Errorf("prefix operator %q requires one non-nil operand", term.tk.String())
|
||||
}
|
||||
case posPostfix:
|
||||
if term.children == nil || len(term.children) != 1 || term.anyChildrenNil() {
|
||||
err = term.tk.Errorf("postfix operator %q requires one not nil operand", term.tk.String())
|
||||
err = term.tk.Errorf("postfix operator %q requires one non-nil operand", term.tk.String())
|
||||
}
|
||||
case posMultifix:
|
||||
if term.children == nil || len(term.children) < 3 || term.anyChildrenNil() {
|
||||
|
Loading…
Reference in New Issue
Block a user