start with melon and tests

First step, create a basic class
This commit is contained in:
Torsten Ruger
2016-12-18 17:02:55 +02:00
parent b8cf72e729
commit 170d453a36
8 changed files with 44 additions and 1 deletions

18
lib/melon/compiler.rb Normal file
View File

@ -0,0 +1,18 @@
module Melon
class Compiler < AST::Processor
def self.compile input
ast = Parser::Ruby22.parse input
compiler = self.new
compiler.process ast
end
def on_class statement
name , _ , _ = *statement
clazz_name = name.children[1]
Parfait::Space.object_space.create_class(clazz_name , nil )
end
end
end