separate ticker for internal codes

This commit is contained in:
Torsten Ruger 2015-10-29 16:53:46 +02:00
parent 4bf8ac5345
commit b76fe1645e

View File

@ -7,22 +7,20 @@ class SourceView < ElementView
def draw
@text = div
@element = div(".source_view") << div("h4" ,"Future") << @text
@ticker = div
@element = div(".source_view") << div("h4" ,"Future") << @ticker << @text
@element
end
def instruction_changed
@text.text = source
end
def source
i = @interpreter.instruction
return "" unless i
case i.source
when AST::Node
i.source.to_s
@text.text = i.source.to_s
@ticker.text = ""
when String
"String " + i.source
@ticker.text = i.source
else
raise i.source.class.name
end