Method: Ascode::Interpreter::Main#run

Defined in:
lib/ascode/interpreter/main.rb

#runObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ascode/interpreter/main.rb', line 20

def run
  @env.ast.each do |action|
    name = action[:action]

    if name == "push"
      @env.push(action[:what])
    elsif name == "condition"
      Condition.begin @env, action[:true_block], action[:false_block]
    else
      call action[:type], name
    end
  end
end