Class: Loxxy::BackEnd::Engine::NativeFunction

Inherits:
Struct
  • Object
show all
Defined in:
lib/loxxy/back_end/engine.rb

Instance Method Summary collapse

Instance Method Details

#accept(_visitor) ⇒ Object



348
349
350
# File 'lib/loxxy/back_end/engine.rb', line 348

def accept(_visitor)
  interp.stack.push self
end

#callObject



352
353
354
# File 'lib/loxxy/back_end/engine.rb', line 352

def call
  callable.call
end

#to_strObject



356
357
358
# File 'lib/loxxy/back_end/engine.rb', line 356

def to_str
  '<native fn>'
end