still +1 errors

also bigger risc view
This commit is contained in:
Torsten Ruger 2018-05-15 12:07:52 +03:00
parent 89e221c748
commit 9832c8730b
4 changed files with 8 additions and 9 deletions

View File

@ -18,15 +18,15 @@ body
margin-left: 1%
.vool_view
width: 14%
width: 12%
margin-left: 1%
.mom_view
width: 24%
width: 16%
margin-left: 1%
.risc_view
width: 24%
width: 34%
margin-left: 1%
.status_view
@ -82,7 +82,6 @@ body
.risc_bright , .mom_bright
background-color: black
font-size: 1.2rem
color: #53a5ff
border-radius: 7px

View File

@ -72,6 +72,7 @@ class SelectView < ElementView
{ while_with_calls: 'a = 0; while( 0 > a); a = 1 + a;end;return a',
set_internal_byte: "return 'Hello'.set_internal_byte(1,75)" ,
called_if: 'if( 10 ); return "then";else;return "else";end' ,
plus: 'return 5 + 7' ,
hello_world: "h = 'Hello World'.putstring;return h",
dynamic_call: "a = 150 ; return a.div10",
}

View File

@ -32,8 +32,8 @@ class ObjectView < ListView
end
#puts "got var name #{variable}#{variable.class} for #{at}, #{f}"
view = RefView.new( variable , f , @z )
if( @children[at] )
replace_at(at , view)
if( @children[at + 1] )
replace_at(at + 1, view)
else
append_view(view)
end
@ -53,7 +53,7 @@ class ObjectView < ListView
fields << RefView.new( variable , f , @z )
end
if( object.is_a?(Parfait::List) )
index = 1
index = 0
object.each do | o|
fields << RefView.new( index.to_s , o , @z )
index += 1

View File

@ -36,8 +36,7 @@ class RiscView < ListView
def instruction_text
return "" unless @interpreter.instruction
text = @interpreter.instruction.to_s
text.split("(").first
@interpreter.instruction.to_s.split("(").first
end
end