2015-09-19 15:28:41 +02:00
|
|
|
module Bosl
|
2015-09-19 17:56:18 +02:00
|
|
|
Compiler.class_eval do
|
2015-05-04 13:22:22 +02:00
|
|
|
# module attr_reader :name ,:expressions
|
2015-09-20 15:30:39 +02:00
|
|
|
def on_module expression
|
2015-09-27 19:28:34 +02:00
|
|
|
name , rest = *expression
|
|
|
|
return process_all(rest).last
|
2014-06-25 01:47:59 +02:00
|
|
|
end
|
|
|
|
|
2015-09-19 17:56:18 +02:00
|
|
|
def on_class expression
|
2015-09-20 15:52:26 +02:00
|
|
|
#puts expression.inspect
|
2015-09-20 15:30:39 +02:00
|
|
|
name , derives , expressions = *expression
|
|
|
|
clazz = Parfait::Space.object_space.get_class_by_name! name
|
2015-07-30 18:18:41 +02:00
|
|
|
#puts "Compiling class #{clazz.name.inspect}"
|
2015-09-20 15:30:39 +02:00
|
|
|
expression_value = process_all(expressions).last
|
2014-06-25 01:47:59 +02:00
|
|
|
|
2015-07-19 11:34:23 +02:00
|
|
|
return expression_value
|
2014-08-06 17:49:20 +02:00
|
|
|
end
|
2015-05-08 14:10:30 +02:00
|
|
|
end
|
2015-05-04 13:22:22 +02:00
|
|
|
end
|