Class: Rley::ParseRep::CSTRawNode

Inherits:
Struct
  • Object
show all
Defined in:
lib/rley/parse_rep/parse_tree_builder.rb

Overview

Structure used internally by ParseTreeBuilder class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aRange, aSymbol) ⇒ CSTRawNode

Constructor.

Parameters:

  • aRange (Lexical::TokenRange)

    The token position range.

  • aSymbol (Syntax::Symbol)

    A symbol from grammar.



20
21
22
23
24
25
# File 'lib/rley/parse_rep/parse_tree_builder.rb', line 20

def initialize(aRange, aSymbol)
  super
  self.range = aRange
  self.symbol = aSymbol
  self.children = nil
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



16
17
18
# File 'lib/rley/parse_rep/parse_tree_builder.rb', line 16

def children
  @children
end

#rangeObject

Returns the value of attribute range

Returns:

  • (Object)

    the current value of range



16
17
18
# File 'lib/rley/parse_rep/parse_tree_builder.rb', line 16

def range
  @range
end

#symbolObject

Returns the value of attribute symbol

Returns:

  • (Object)

    the current value of symbol



16
17
18
# File 'lib/rley/parse_rep/parse_tree_builder.rb', line 16

def symbol
  @symbol
end