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 187B

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