Fix export of grouping modifier

This commit is contained in:
Tristan Colgate 2016-11-04 11:06:07 +00:00
parent ec66082749
commit ab60bc3929
2 changed files with 6 additions and 4 deletions

View File

@ -176,9 +176,7 @@ func (node *BinaryExpr) String() string {
} else { } else {
matching += "RIGHT" matching += "RIGHT"
} }
if len(vm.Include) > 0 { matching += fmt.Sprintf("(%s)", vm.Include)
matching += fmt.Sprintf("(%s)", vm.Include)
}
} }
} }
return fmt.Sprintf("%s %s%s%s %s", node.LHS, node.Op, returnBool, matching, node.RHS) return fmt.Sprintf("%s %s%s%s %s", node.LHS, node.Op, returnBool, matching, node.RHS)

View File

@ -94,7 +94,11 @@ func TestExprString(t *testing.T) {
in: `a - ON(b) GROUP_LEFT(x, y) c`, in: `a - ON(b) GROUP_LEFT(x, y) c`,
}, },
{ {
in: `a - ON(b) GROUP_LEFT c`, in: `a - ON(b) GROUP_LEFT c`,
out: `a - ON(b) GROUP_LEFT() c`,
},
{
in: `a - ON(b) GROUP_LEFT() (c)`,
}, },
{ {
in: `a - IGNORING(b) c`, in: `a - IGNORING(b) c`,