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



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

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

#callObject



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

def call
  callable.call
end

#to_strObject



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

def to_str
  '<native fn>'
end