class XfOOrth::NosSpec
A class used to specify the compile of dyadic operators.
Public Instance Methods
build_builds_string(_name, symbol)
click to toggle source
Generate the Ruby code for this dyadic operator.
Parameters:
-
_name - The string that maps to the symbol. Unused
-
symbol - The symbol that the name maps to.
# File lib/fOOrth/compiler/word_specs.rb, line 92 def build_builds_string(_name, symbol) @builds = "vm.swap_pop.#{symbol}(vm); " end
get_stub_action(name, symbol)
click to toggle source
Get the default action if none is specified.
# File lib/fOOrth/compiler/word_specs.rb, line 97 def get_stub_action(name, symbol) lambda do |vm| #NOS methods leave an extra item on the stack which must #be removed at this time. vm.data_stack.pop f20_error(self, name, symbol) end end