XPath compiler support for the self axis
This commit is contained in:
parent
bc49af02a2
commit
02ee35122a
|
@ -257,6 +257,17 @@ module Oga
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @param [AST::Node] ast
|
||||||
|
# @param [Oga::Ruby::Node] input
|
||||||
|
# @return [Oga::Ruby::Node]
|
||||||
|
def on_axis_self(ast, input, &block)
|
||||||
|
node = node_literal
|
||||||
|
|
||||||
|
backup_variable(node, input) do
|
||||||
|
process(ast, node, &block).if_true { yield node }
|
||||||
|
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