365a9e9fa9
This changes the XPath AST so that every segment in a path (e.g. foo/bar) is parsed as a child node of the node that precedes it. For example, take the following expression: foo/bar This used to be parsed into the following AST: (path (axis "child" (test nil "foo")) (axis "child" (test nil "bar"))) This is now parsed into the following AST: (axis "child" (test nil "foo") (axis "child" (test nil "bar"))) This new AST is much easier to deal with in the XPath::Compiler class, especially when trying to ensure that each segment operates on the correct input. This commit also fixes parsing of type tests with predicates, such as: comment()[10] This used to throw a parser error. |
||
---|---|---|
.. | ||
oga | ||
support | ||
spec_helper.rb |