From 31aa9c876833462199c0ef1aea0714f8ee2492a2 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 10 May 2014 10:59:56 +0300 Subject: [PATCH] actually ads a value to Value --- lib/vm/values.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/vm/values.rb b/lib/vm/values.rb index 83bdcfd4..d83c4067 100644 --- a/lib/vm/values.rb +++ b/lib/vm/values.rb @@ -20,6 +20,21 @@ module Vm # just a base class for data. not sure how this will be usefull (may just have read too much llvm) class Value < Code + + def initialize value + @value = value + end + #naming convention to infer types in kernel functions. Kernel types are basic types, ie see below + # + def self.type name + parts = name.split("_") + t = "Basic" + if parts[1] + t = parts[1] + end + t + end + end class Word < Value