Class: Nydp::Invocation::Invocation_SYM_LEX

Inherits:
Base
  • Object
show all
Defined in:
lib/nydp/function_invocation.rb

Instance Method Summary collapse

Methods inherited from Base

#handle, #inspect, #lexical_reach, #source, #to_s

Methods included from Helper

#cons, #list, #literal?, #pair?, #sig, #sym, #sym?

Methods included from Converter

#n2r, #r2n

Constructor Details

#initialize(expr, src) ⇒ Invocation_SYM_LEX

Returns a new instance of Invocation_SYM_LEX.



161
162
163
164
165
# File 'lib/nydp/function_invocation.rb', line 161

def initialize expr, src
  super expr, src
  @sym = expr.car
  @lex = expr.cdr.car
end

Instance Method Details

#execute(vm) ⇒ Object



167
168
169
170
171
172
173
# File 'lib/nydp/function_invocation.rb', line 167

def execute vm
#        Invocation.sig self.class.name
  a0 = @lex.value(vm.current_context)
  @sym.value.invoke_2 vm, a0
rescue StandardError => e
  handle e, @sym.value, :invoke_2, a0
end