first steps (nothing works)

This commit is contained in:
Torsten Ruger 2015-07-29 18:19:26 +03:00
parent 56521fd5ed
commit 3bad4cc570
4 changed files with 53 additions and 18 deletions

View File

@ -1,11 +1,2 @@
# Specify which components you wish to include when
# 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'

View File

@ -2,7 +2,10 @@
module Main
class MainController < Volt::ModelController
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
def about

View File

@ -2,5 +2,51 @@
Home
<: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>

View File

@ -6,13 +6,8 @@
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %>
<head>
<meta charset="UTF-8" />
<% javascript_files.each do |javascript_file| %>
<script src="<%= javascript_file %>"></script>
<% end %>
<% css_files.each do |css_file| %>
<link href="<%= css_file %>" media="all" rel="stylesheet" type="text/css" />
<% end %>
<%= javascript_tags %>
<%= css_tags %>
</head>
<body>