first steps (nothing works)
This commit is contained in:
parent
56521fd5ed
commit
3bad4cc570
@ -1,11 +1,2 @@
|
|||||||
# Specify which components you wish to include when
|
# Specify which components you wish to include when
|
||||||
# the "home" component loads.
|
# the "home" component loads.
|
||||||
|
|
||||||
# bootstrap css framework
|
|
||||||
component 'bootstrap'
|
|
||||||
|
|
||||||
# a default theme for the bootstrap framework
|
|
||||||
component 'bootstrap_jumbotron_theme'
|
|
||||||
|
|
||||||
# provides templates for login, signup, and logout
|
|
||||||
component 'user_templates'
|
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
module Main
|
module Main
|
||||||
class MainController < Volt::ModelController
|
class MainController < Volt::ModelController
|
||||||
def index
|
def index
|
||||||
# Add code for when the index view is loaded
|
code = Ast::ExpressionList.new( [Ast::CallSiteExpression.new(:putstring, [] ,Ast::StringExpression.new("Hello again"))])
|
||||||
|
Virtual::Compiler.compile( code , machine.space.get_main )
|
||||||
|
machine.run_before "Register::CallImplementation"
|
||||||
|
interpreter.start machine.init
|
||||||
end
|
end
|
||||||
|
|
||||||
def about
|
def about
|
||||||
|
@ -2,5 +2,51 @@
|
|||||||
Home
|
Home
|
||||||
|
|
||||||
<:Body>
|
<:Body>
|
||||||
<h1>Home</h1>
|
|
||||||
|
|
||||||
|
<div class="debugger_view">
|
||||||
|
ClassView classes: machine.space.classes
|
||||||
|
<div class="file_view">
|
||||||
|
"Future Source code view"
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="source_view">
|
||||||
|
<h4> Virtual Machine Instruction </h4>
|
||||||
|
page.sources.each do |s|
|
||||||
|
<br> s </br>
|
||||||
|
end
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="block_view">
|
||||||
|
<div>
|
||||||
|
<h4> method_name </h4>
|
||||||
|
<h4> Block: #{block_name} </h4>
|
||||||
|
</div>
|
||||||
|
block.each do |code|
|
||||||
|
InstructionView :interpreter => interpreter , :instruction => code
|
||||||
|
end
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="status_view">
|
||||||
|
<div>
|
||||||
|
button.bright { "next" }.on(:click) { interpreter.tick }
|
||||||
|
" ".br
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4> Status </h4>
|
||||||
|
<br> state.to_s </br>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4> Stdout </h4>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<br> interpreter.stdout </br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="registers_view">
|
||||||
|
registers.each do |r , oid|
|
||||||
|
RegisterView interpreter: interpreter , register: r
|
||||||
|
end
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@ -6,13 +6,8 @@
|
|||||||
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %>
|
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<% javascript_files.each do |javascript_file| %>
|
<%= javascript_tags %>
|
||||||
<script src="<%= javascript_file %>"></script>
|
<%= css_tags %>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% css_files.each do |css_file| %>
|
|
||||||
<link href="<%= css_file %>" media="all" rel="stylesheet" type="text/css" />
|
|
||||||
<% end %>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user