Fix text merging

This commit is contained in:
Mathieu Darse
2015-11-04 12:49:49 +01:00
parent 0e16a1e699
commit f3a15fb19f
2 changed files with 3 additions and 1 deletions

View File

@@ -241,7 +241,7 @@ class QueryVisitor implements Visit
throw new \Exception('Unexpected context after non-contextualizable node');
}
} elseif ($node instanceof AST\Node) {
$root = new AST\AndExpression($root, $node);
$root = new AST\Boolean\AndOperator($root, $node);
} else {
throw new \Exception('Unexpected node type inside text node.');
}

View File

@@ -1,5 +1,7 @@
foo|<text:"foo">
foo (bar)|<text:"foo" context:"bar">
foo "bar"|(<text:"foo "> AND <exact_text:"bar">)
"foo" bar|(<exact_text:"foo"> AND <text:" bar">)
# foo ("bar baz")|<text:"foo" context:"bar baz">
foo bar|<text:"foo bar">
foo bar (baz qux)|<text:"foo bar" context:"baz qux">
Can't render this file because it contains an unexpected character in line 1 and column 11.