Class: ScopedSearch::QueryLanguage::AST::Node
- Inherits:
-
Object
- Object
- ScopedSearch::QueryLanguage::AST::Node
- Defined in:
- lib/scoped_search/query_language/ast.rb
Overview
Base AST node class. Instances of this class are used to represent an abstract syntax tree. This syntax tree is created by the ScopedSearch::QueryLanguage parser and visited by the ScopedSearch::QueryBuilder to create SQL query conditions.
Direct Known Subclasses
Instance Method Summary collapse
-
#compatible_with(node) ⇒ Object
:nodoc.
-
#inspect ⇒ Object
:nodoc.
-
#simplify ⇒ Object
Tree simplification.
Instance Method Details
#compatible_with(node) ⇒ Object
:nodoc
34 35 36 |
# File 'lib/scoped_search/query_language/ast.rb', line 34 def compatible_with(node) # :nodoc false end |
#inspect ⇒ Object
:nodoc
25 26 27 |
# File 'lib/scoped_search/query_language/ast.rb', line 25 def inspect # :nodoc "<AST::#{self.class.to_s.split('::').last} #{self.to_a.inspect}>" end |
#simplify ⇒ Object
Tree simplification. By default, do nothing and return the node as is.
30 31 32 |
# File 'lib/scoped_search/query_language/ast.rb', line 30 def simplify return self end |