more transition

This commit is contained in:
Torsten Ruger
2015-07-14 14:21:33 +03:00
parent 7d2120fdd5
commit 71ed4f60d7
7 changed files with 20 additions and 156 deletions

View File

@ -1,6 +1,7 @@
require 'browser'
require 'native'
require "salama"
require "point"
require_relative "registers_view"
require_relative "object_view"

11
lib/parse_task.rb Normal file
View File

@ -0,0 +1,11 @@
require "salama-reader"
class ParseTask
def parse(num)
string_input = '"Hello again".putstring()'
parser = Parser::Salama.new
out = parser.parse(string_input)
parts = Parser::Transform.new.apply(out)
parts.to_basic
end
end

7
lib/point.rb Normal file
View File

@ -0,0 +1,7 @@
class Point
def initialize x = 0 , y = 0
@x = x
@y = y
end
attr_accessor :x , :y
end

View File

@ -21,7 +21,7 @@ Point.class_eval do
end
end
class SpaceView < Graphics
class SpaceView
include Sof::Util
def initialize