XPath compiler now actually returns a Proc

This commit is contained in:
Yorick Peterse committed 2015-08-19 20:14:20 +02:00
1 parent d11a754946
commit 6d01adafc7
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -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
##