Sha256: 7245c88b56a80274112ea29533e644478a5c44617e94577d0f92493408ee7819

Contents?: true

Size: 368 Bytes

Versions: 4

Compression:

Stored size: 368 Bytes

Contents

require "lasp/version"
require "lasp/eval"

module Lasp
  STDLIB_PATH = File.expand_path("../lasp/stdlib.lasp", __FILE__)

  module_function

  def execute_file(path)
    execute("(do #{File.read(path)})")
  end

  def execute(program, env = global_env)
    Lasp::eval(Lasp::parse(program), env)
  end

  def load_stdlib!
    Lasp::execute_file(STDLIB_PATH)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lasp-0.7.0 lib/lasp.rb
lasp-0.6.0 lib/lasp.rb
lasp-0.5.0 lib/lasp.rb
lasp-0.4.0 lib/lasp.rb