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.



11534
11535
11536
11537
# File 'lib/syntax_tree.rb', line 11534

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11532
11533
11534
# File 'lib/syntax_tree.rb', line 11532

def location
  @location
end

#valueObject (readonly)

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

the value of the

symbol



11529
11530
11531
# File 'lib/syntax_tree.rb', line 11529

def value
  @value
end