A toy dynamic programming language written in Ruby
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

interpreter.rb 174B

12345678910
  1. class Interpreter
  2. def initialize(tree, env = Environment.new)
  3. @tree = tree
  4. @env = env
  5. end
  6. def interpret
  7. @tree.each { |node| node.execute(@env) }
  8. end
  9. end