Class: Crisp::Runtime

Inherits:
Object
  • Object
show all
Defined in:
lib/crisp/runtime.rb

Instance Method Summary collapse

Constructor Details

#initializeRuntime

Returns a new instance of Runtime.



3
4
5
6
# File 'lib/crisp/runtime.rb', line 3

def initialize
  @env = Env.new
  Functions.load(@env)
end

Instance Method Details

#run(ast) ⇒ Object



8
9
10
# File 'lib/crisp/runtime.rb', line 8

def run(ast)
  ast.eval(@env)
end