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.



10975
10976
10977
10978
# File 'lib/syntax_tree.rb', line 10975

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



10973
10974
10975
# File 'lib/syntax_tree.rb', line 10973

def location
  @location
end

#valueObject (readonly)

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

the value of the

symbol



10970
10971
10972
# File 'lib/syntax_tree.rb', line 10970

def value
  @value
end