Class ScopedSearch::QueryLanguage::AST::Node
In: lib/scoped_search/query_language/ast.rb
Parent: Object

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.

Methods

Public Instance methods

[Source]

    # File lib/scoped_search/query_language/ast.rb, line 34
34:     def compatible_with(node) # :nodoc
35:       false
36:     end

[Source]

    # File lib/scoped_search/query_language/ast.rb, line 25
25:     def inspect # :nodoc
26:       "<AST::#{self.class.to_s.split('::').last} #{self.to_a.inspect}>"
27:     end

Tree simplification. By default, do nothing and return the node as is.

[Source]

    # File lib/scoped_search/query_language/ast.rb, line 30
30:     def simplify
31:       return self
32:     end

[Validate]