Class: Kumi::Core::NAST::Const

Inherits:
Node
  • Object
show all
Defined in:
lib/kumi/core/nast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#id, #loc, #meta

Instance Method Summary collapse

Methods inherited from Node

#children, #each_child

Constructor Details

#initialize(value:, **k) ⇒ Const

Returns a new instance of Const.



36
37
38
39
# File 'lib/kumi/core/nast.rb', line 36

def initialize(value:, **k)
  super(**k)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



34
35
36
# File 'lib/kumi/core/nast.rb', line 34

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



41
42
43
# File 'lib/kumi/core/nast.rb', line 41

def accept(visitor)
  visitor.visit_const(self)
end