From 89e221c74883e1db2c56faab6481b0b6546ef037 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 20 Apr 2018 19:40:17 +0300 Subject: [PATCH] a larger while example need a way to see the code --- assets/css/app.css.sass | 8 ++++---- lib/views/left_view.rb | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/css/app.css.sass b/assets/css/app.css.sass index 10c8c63..75fb5cc 100644 --- a/assets/css/app.css.sass +++ b/assets/css/app.css.sass @@ -1,6 +1,6 @@ body - background-color: black + background-color: #1a1a1a color: white .one_class, .classes, .vool_view ,.mom_view , .risc_view, .status_view ,.vool_view @@ -81,9 +81,9 @@ body background-color: #009900 .risc_bright , .mom_bright - padding-right: 6px - padding-left: 6px - background-color: #00E3FF + background-color: black + font-size: 1.2rem + color: #53a5ff border-radius: 7px .fade_in diff --git a/lib/views/left_view.rb b/lib/views/left_view.rb index 85ac90f..1c4902f 100644 --- a/lib/views/left_view.rb +++ b/lib/views/left_view.rb @@ -63,18 +63,18 @@ class SelectView < ElementView ruby = get_codes[code] Vool::VoolCompiler.ruby_to_vool( as_main(ruby) ) machine.objects - puts "starting" @interpreter.start machine.risc_init end def as_main(statements) "class Space ;def main(arg) ; #{statements}; end; end" end def get_codes - {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 = 150 ; return a.div10", - } + { 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' , + hello_world: "h = 'Hello World'.putstring;return h", + dynamic_call: "a = 150 ; return a.div10", + } end end