Class: StructuredSearch::Tree::BaseNode
- Inherits:
-
Object
- Object
- StructuredSearch::Tree::BaseNode
- Defined in:
- lib/structured_search/base_node.rb
Overview
The base of any node in the AST, it stores the line, column and type of token.
Instance Attribute Summary collapse
-
#column ⇒ Object
line- The line this AST node was found
column - The column this AST node was found
type -
Holds the type of node for fast lookup.
- The column this AST node was found
- The line this AST node was found
-
#line ⇒ Object
line- The line this AST node was found
column - The column this AST node was found
type -
Holds the type of node for fast lookup.
- The column this AST node was found
- The line this AST node was found
-
#type ⇒ Object
line- The line this AST node was found
column - The column this AST node was found
type -
Holds the type of node for fast lookup.
- The column this AST node was found
- The line this AST node was found
Instance Method Summary collapse
-
#initialize(topts = {}) ⇒ BaseNode
constructor
sends each token value to it’s respective attribute.
Constructor Details
#initialize(topts = {}) ⇒ BaseNode
sends each token value to it’s respective attribute
14 15 16 |
# File 'lib/structured_search/base_node.rb', line 14 def initialize(topts = {}) topts.each { |key, val| send "#{key}=", val } end |
Instance Attribute Details
#column ⇒ Object
line-
The line this AST node was found
column-
The column this AST node was found
type-
Holds the type of node for fast lookup
11 12 13 |
# File 'lib/structured_search/base_node.rb', line 11 def column @column end |
#line ⇒ Object
line-
The line this AST node was found
column-
The column this AST node was found
type-
Holds the type of node for fast lookup
11 12 13 |
# File 'lib/structured_search/base_node.rb', line 11 def line @line end |
#type ⇒ Object
line-
The line this AST node was found
column-
The column this AST node was found
type-
Holds the type of node for fast lookup
11 12 13 |
# File 'lib/structured_search/base_node.rb', line 11 def type @type end |