Class: SyntaxTree::SymbolContent

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.rb

Overview

SymbolContent represents symbol contents and is always the child of a SymbolLiteral node.

:symbol

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ SymbolContent

Returns a new instance of SymbolContent.



11454
11455
11456
11457
# File 'lib/syntax_tree.rb', line 11454

def initialize(value:, location:)
  @value = value
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11452
11453
11454
# File 'lib/syntax_tree.rb', line 11452

def location
  @location
end

#valueObject (readonly)

Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op

the value of the

symbol



11449
11450
11451
# File 'lib/syntax_tree.rb', line 11449

def value
  @value
end