Super basic boilerplate for the XPath compiler

This commit is contained in:
Yorick Peterse 2015-06-22 23:49:09 +02:00
parent 46f3ec9df5
commit f10b7aa065
2 changed files with 15 additions and 0 deletions

View File

@ -52,6 +52,7 @@ require 'oga/html/entities'
require 'oga/xpath/lexer'
require 'oga/xpath/parser'
require 'oga/xpath/evaluator'
require 'oga/xpath/compiler'
require 'oga/css/lexer'
require 'oga/css/parser'

14
lib/oga/xpath/compiler.rb Normal file
View File

@ -0,0 +1,14 @@
module Oga
module XPath
##
# Compiling of XPath ASTs into Ruby source code.
#
# The Compiler class can be used to turn an XPath AST into Ruby source code
# that can be executed to match XML nodes in a given input document/element.
# Compiled source code is cached per expression, removing the need for
# recompiling the same expression over and over again.
#
class Compiler
end # Compiler
end # XPath
end # Oga