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

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

Overview

rubocop: disable Lint/UselessConstantScoping

Instance Method Summary collapse

Instance Method Details

#accept(_visitor) ⇒ Object



451
452
453
# File 'lib/loxxy/back_end/engine.rb', line 451

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

#callObject



455
456
457
# File 'lib/loxxy/back_end/engine.rb', line 455

def call
  callable.call
end

#to_strObject



459
460
461
# File 'lib/loxxy/back_end/engine.rb', line 459

def to_str
  '<native fn>'
end