hack exception

but hey, it can do maths!
This commit is contained in:
Torsten Ruger 2018-04-09 15:08:56 +03:00
parent 73643e4882
commit 17a49348db
2 changed files with 4 additions and 3 deletions

View File

@ -58,7 +58,7 @@ class SelectView < ElementView
{set_internal_byte: "return 'Hello'.set_internal_byte(1,75)" ,
called_if: 'if( 10 ); return "then";else;return "else";end' ,
hello_world: "h = 'Hello World'.putstring;return h",
dynamic_call: "a = 15 ; return a.div10",
dynamic_call: "a = 150 ; return a.div10",
}
end

View File

@ -32,7 +32,7 @@ class SourceView < ElementView
when Risc::Instruction
@ticker.text = i.source.to_s
else
raise i.source.class.name
raise "Unrecognized source #{i.source.class.name} for #{i}"
end
end
@ -47,6 +47,7 @@ class SourceView < ElementView
return unless (i.is_a? Risc::Label)
return unless i.is_method
puts i.name
return
cl_t_name , method_name = *i.name.split(".")
class_name = cl_t_name.split(" ").last.split("_").first
clazz = Parfait.object_space.get_class_by_name class_name