Class: Nydp::Cond_LEX_LEX_LIT

Inherits:
CondBase show all
Defined in:
lib/nydp/cond.rb

Instance Method Summary collapse

Methods inherited from CondBase

#initialize, #inspect, #lexical_reach, #to_s

Methods included from Helper

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

Methods included from Converter

#n2r, #r2n

Constructor Details

This class inherits a constructor from Nydp::CondBase

Instance Method Details

#execute(vm) ⇒ Object



176
177
178
179
# File 'lib/nydp/cond.rb', line 176

def execute vm
  falsity = Nydp::NIL.is?(@condition.value vm.current_context)
  vm.push_arg(falsity ? @when_false : (@when_true.value vm.current_context))
end