lib/lasp.rb in lasp-0.7.0 vs lib/lasp.rb in lasp-0.8.0
- old
+ new
@@ -1,7 +1,8 @@
require "lasp/version"
require "lasp/eval"
+require "lasp/parser"
module Lasp
STDLIB_PATH = File.expand_path("../lasp/stdlib.lasp", __FILE__)
module_function
@@ -9,10 +10,10 @@
def execute_file(path)
execute("(do #{File.read(path)})")
end
def execute(program, env = global_env)
- Lasp::eval(Lasp::parse(program), env)
+ Lasp::eval(Parser.new.parse(program), env)
end
def load_stdlib!
Lasp::execute_file(STDLIB_PATH)
end