XPath compiler support for "descendant"
This commit is contained in:
parent
f8671a96b7
commit
ca7930cbf4
|
@ -231,6 +231,19 @@ module Oga
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @param [AST::Node] ast
|
||||||
|
# @param [Oga::Ruby::Node] input
|
||||||
|
# @return [Oga::Ruby::Node]
|
||||||
|
def on_axis_descendant(ast, input, &block)
|
||||||
|
node = node_literal
|
||||||
|
|
||||||
|
backup_variable(node, input) do
|
||||||
|
node.each_node.add_block(node) do
|
||||||
|
process(ast, node, &block).if_true { yield node }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# @param [AST::Node] ast
|
# @param [AST::Node] ast
|
||||||
# @param [Oga::Ruby::Node] input
|
# @param [Oga::Ruby::Node] input
|
||||||
# @return [Oga::Ruby::Node]
|
# @return [Oga::Ruby::Node]
|
||||||
|
|
Loading…
Reference in New Issue