XPath compiler support for the self axis

This commit is contained in:
Yorick Peterse committed 2015-08-19 20:14:22 +02:00
1 parent bc49af02a2
commit 02ee35122a
1 file changed
+11
+11
View File
@@ -257,6 +257,17 @@ module Oga
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 [Oga::Ruby::Node] input
# @return [Oga::Ruby::Node]