separate ticker for internal codes
This commit is contained in:
parent
4bf8ac5345
commit
b76fe1645e
@ -7,22 +7,20 @@ class SourceView < ElementView
|
|||||||
|
|
||||||
def draw
|
def draw
|
||||||
@text = div
|
@text = div
|
||||||
@element = div(".source_view") << div("h4" ,"Future") << @text
|
@ticker = div
|
||||||
|
@element = div(".source_view") << div("h4" ,"Future") << @ticker << @text
|
||||||
@element
|
@element
|
||||||
end
|
end
|
||||||
|
|
||||||
def instruction_changed
|
def instruction_changed
|
||||||
@text.text = source
|
|
||||||
end
|
|
||||||
|
|
||||||
def source
|
|
||||||
i = @interpreter.instruction
|
i = @interpreter.instruction
|
||||||
return "" unless i
|
return "" unless i
|
||||||
case i.source
|
case i.source
|
||||||
when AST::Node
|
when AST::Node
|
||||||
i.source.to_s
|
@text.text = i.source.to_s
|
||||||
|
@ticker.text = ""
|
||||||
when String
|
when String
|
||||||
"String " + i.source
|
@ticker.text = i.source
|
||||||
else
|
else
|
||||||
raise i.source.class.name
|
raise i.source.class.name
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user