crystal says Hello.

This commit is contained in:
Torsten Ruger
2014-05-06 21:36:28 +03:00
parent fa123e0354
commit 4135c4d2dc
14 changed files with 134 additions and 114 deletions

View File

@@ -29,8 +29,9 @@ module Ast
end
def compile context
# TODO check if needst to be added?
Vm::ObjectReference.new( Vm::StringValue.new(string) )
value = Vm::StringLiteral.new(string)
context.program.add_object value
value
end
def == other
compare other , [:string]

View File

@@ -12,8 +12,8 @@ module Ast
fun = Vm::FunctionCall.new( name , args.collect{ |a| a.compile(context) } )
fun.assign_function context
fun.load_args
#puts "funcall #{self.inspect}"
fun.do_call
fun
end
def == other