Support implicit boolean expression nested in groups

This commit is contained in:
David Stotijn
2020-11-17 21:34:59 +01:00
parent 5bce912e89
commit 8ab65fb55f
2 changed files with 24 additions and 3 deletions

View File

@ -153,6 +153,16 @@ func TestParseQuery(t *testing.T) {
},
expectedError: nil,
},
{
name: "implicit boolean expression nested in group",
input: "(foo bar)",
expectedExpression: &InfixExpression{
Operator: TokOpAnd,
Left: &StringLiteral{Value: "foo"},
Right: &StringLiteral{Value: "bar"},
},
expectedError: nil,
},
{
name: "implicit and explicit boolean expression with string literal operands",
input: "foo bar OR baz yolo",