small rename

This commit is contained in:
Torsten Ruger
2017-01-14 19:52:16 +02:00
parent bd78a2d555
commit 01fe3b4b04
5 changed files with 12 additions and 12 deletions

View File

@ -54,12 +54,18 @@ module Vm
# Expressions use registers and return the register where their value is stored.
# Helper function to create a new compiler and compie the statement(s)
def self.compile statement
# Statement must be and AST::Node as generated by s expressions
def self.compile_ast( statement )
compiler = MethodCompiler.new
code = Vm.ast_to_code statement
compiler.process code
end
def self.compile_method( method )
compiler = new(method)
compiler.process( code )
end
class MethodCompiler
CompilerModules.each do |mod|
include Vm.const_get( mod.camelize )