node: implement *expr.BooleanNot
This commit is contained in:
parent
199654f552
commit
ce3cd1065d
8
node.go
8
node.go
@ -1082,6 +1082,14 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error)
|
||||
case *expr.ShortArray:
|
||||
return this.convertArrayLiteralCommon(n.Items)
|
||||
|
||||
case *expr.BooleanNot:
|
||||
rhs, err := this.convert(n.Expr)
|
||||
if err != nil {
|
||||
return "", parseErr{n, err}
|
||||
}
|
||||
|
||||
return "!(" + rhs + ")", nil
|
||||
|
||||
case *expr.ArrayDimFetch:
|
||||
// Might be x[foo], might be x[] (i.e. append() call)
|
||||
// In order to make the append() transformation, we need to lookahead
|
||||
|
Loading…
Reference in New Issue
Block a user