XPath compiler now actually returns a Proc
This commit is contained in:
1 parent
d11a754946
commit
6d01adafc7
2 files changed
+7
-2
No files matched your search
@@ -30,11 +30,16 @@ module Oga
|
||||
end
|
||||
end
|
||||
|
||||
literal('lambda').add_block(document) do
|
||||
proc_ast = literal('lambda').add_block(document) do
|
||||
matched.assign(literal(XML::NodeSet).new)
|
||||
.followed_by(ruby_ast)
|
||||
.followed_by(matched)
|
||||
end
|
||||
|
||||
generator = Ruby::Generator.new
|
||||
source = generator.process(proc_ast)
|
||||
|
||||
eval(source)
|
||||
end
|
||||
|
||||
##
|
||||
|
||||
Reference in new issue
Block a user