Skip to content

Commit

Permalink
Compile library.scm to Ruby representation automatically using a Rake…
Browse files Browse the repository at this point in the history
… task.
  • Loading branch information
jcoglan committed Sep 1, 2009
1 parent a586e09 commit cd74912
Show file tree
Hide file tree
Showing 5 changed files with 281 additions and 289 deletions.
1 change: 1 addition & 0 deletions Manifest.txt
Expand Up @@ -8,6 +8,7 @@ lib/heist.rb
lib/repl.rb
lib/trie.rb
lib/builtin/library.scm
lib/builtin/library.rb
lib/builtin/primitives.rb
lib/builtin/syntax.scm
lib/parser/nodes.rb
Expand Down
7 changes: 7 additions & 0 deletions Rakefile
Expand Up @@ -9,6 +9,13 @@ Hoe.spec('heist') do |p|
p.extra_deps = %w(oyster treetop)
end

file "lib/builtin/library.rb" => "lib/builtin/library.scm" do |t|
program = Heist.parse(File.read t.prerequisites.first).convert!
File.open(t.name, 'w') { |f| f.write 'program ' + program.to_ruby.inspect }
end

task :compile => "lib/builtin/library.rb"

namespace :spec do
task :r5rs do
procedures = Dir['r5rs/*.html'].
Expand Down

0 comments on commit cd74912

Please sign in to comment.