opal gods require explicit requires

This commit is contained in:
Torsten Ruger 2016-12-22 21:15:20 +02:00
parent c3c52d36b8
commit 2adec3226c
2 changed files with 22 additions and 6 deletions

View File

@ -1,4 +1,15 @@
require_relative "tree" require_relative "tree"
require_relative "method_compiler/assignment"
require_relative "method_compiler/basic_values"
require_relative "method_compiler/call_site"
require_relative "method_compiler/collections"
require_relative "method_compiler/field_access"
require_relative "method_compiler/if_statement"
require_relative "method_compiler/name_expression"
require_relative "method_compiler/operator_expression"
require_relative "method_compiler/return_statement"
require_relative "method_compiler/statement_list"
require_relative "method_compiler/while_statement"
module Typed module Typed
@ -9,7 +20,7 @@ module Typed
"while_statement"] "while_statement"]
CompilerModules.each do |mod| CompilerModules.each do |mod|
require_relative "method_compiler/" + mod # require_relative "method_compiler/" + mod
end end
# Compiling is the conversion of the AST into 2 things: # Compiling is the conversion of the AST into 2 things:

View File

@ -7,11 +7,16 @@ module Typed
end end
["while_statement", "if_statement" , "return_statement" , "statements", require_relative "tree/while_statement"
"operator_expression" , "field_access" , "call_site" , "basic_values", require_relative "tree/if_statement"
"assignment" , "to_code"].each do |code| require_relative "tree/return_statement"
require_relative "tree/" + code require_relative "tree/statements"
end require_relative "tree/operator_expression"
require_relative "tree/field_access"
require_relative "tree/call_site"
require_relative "tree/basic_values"
require_relative "tree/assignment"
require_relative "tree/to_code"
AST::Node.class_eval do AST::Node.class_eval do