From 2b008dd3dab9f10f3c87fd9950c0418089bd2c57 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 9 Dec 2016 13:40:10 +0200 Subject: [PATCH] modulize basic_value --- lib/typed/compiler.rb | 3 ++- lib/typed/compiler/basic_values.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/typed/compiler.rb b/lib/typed/compiler.rb index c4004ec1..12c39098 100644 --- a/lib/typed/compiler.rb +++ b/lib/typed/compiler.rb @@ -1,6 +1,7 @@ module Typed - CompilerModules = ["assignment" , "call_site", "if_statement" ,"name_expression"] + CompilerModules = [ "assignment" , "basic_values" , "call_site", "if_statement" , + "name_expression"] CompilerModules.each do |mod| require_relative "compiler/" + mod end diff --git a/lib/typed/compiler/basic_values.rb b/lib/typed/compiler/basic_values.rb index 0366c537..8e9aba73 100644 --- a/lib/typed/compiler/basic_values.rb +++ b/lib/typed/compiler/basic_values.rb @@ -1,7 +1,7 @@ module Typed # collection of the simple ones, int and strings and such - Compiler.class_eval do + module BasicValues # Constant expressions can by definition be evaluated at compile time. # But that does not solve their storage, ie they need to be accessible at runtime from _somewhere_