separate ticker for internal codes
This commit is contained in:
parent
4bf8ac5345
commit
b76fe1645e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user