more transition
This commit is contained in:
@ -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
11
lib/parse_task.rb
Normal 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
7
lib/point.rb
Normal file
@ -0,0 +1,7 @@
|
||||
class Point
|
||||
def initialize x = 0 , y = 0
|
||||
@x = x
|
||||
@y = y
|
||||
end
|
||||
attr_accessor :x , :y
|
||||
end
|
@ -21,7 +21,7 @@ Point.class_eval do
|
||||
end
|
||||
end
|
||||
|
||||
class SpaceView < Graphics
|
||||
class SpaceView
|
||||
include Sof::Util
|
||||
|
||||
def initialize
|
||||
|
Reference in New Issue
Block a user