Class: Kumi::Core::NAST::Call

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

Constructor Details

#initialize(fn:, args:, opts: {}, **k) ⇒ Call

Returns a new instance of Call.



92
93
94
95
96
97
# File 'lib/kumi/core/nast.rb', line 92

def initialize(fn:, args:, opts: {}, **k)
  super(**k)
  @fn = fn.to_sym
  @args = args
  @opts = opts
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



90
91
92
# File 'lib/kumi/core/nast.rb', line 90

def args
  @args
end

#fnObject (readonly)

Returns the value of attribute fn.



90
91
92
# File 'lib/kumi/core/nast.rb', line 90

def fn
  @fn
end

#optsObject (readonly)

Returns the value of attribute opts.



90
91
92
# File 'lib/kumi/core/nast.rb', line 90

def opts
  @opts
end

Instance Method Details

#accept(visitor) ⇒ Object



99
100
101
# File 'lib/kumi/core/nast.rb', line 99

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