small rename
This commit is contained in:
@ -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 )
|
||||
|
Reference in New Issue
Block a user