Permalink
Browse files

Revert "Start on new compiler"

This reverts commit aecf25c.
  • Loading branch information...
1 parent aecf25c commit bf1602b92ed4bdf7119fa7fb0ba5bbfde5ec4ab9 @rkh committed Feb 7, 2011
Showing with 0 additions and 61 deletions.
  1. 0 lib/reak/new_compiler/ast.rb
  2. +0 −16 lib/reak/new_compiler/compiler.rb
  3. +0 −45 lib/reak/new_compiler/stages.rb
No changes.
@@ -1,16 +0,0 @@
-module Reak
- class Compiler < Rubinius::Compiler
- def self.compiled_name(file)
- file + (file.suffix?(".st") ? "c" : ".compiled.stc")
- end
-
- def initialize(from, to)
- super map_stage(from), map_stage(to)
- end
-
- def map_stage(stage)
- mapped = :"reak_#{stage}"
- Stages.include?(mapped) ? mapped : stage
- end
- end
-end
@@ -1,45 +0,0 @@
-module Reak
- module Compiler
- class Parser < Rubinius::Compiler::Parser
- def initialize(compiler, last)
- super
- @processor = Reak::Parser
- end
-
- def create
- # TODO: we totally ignore @transforms
- @parser = @processor.new(@file, @line)
- @parser
- end
- end
-
- class FileParser < Parser
- stage :reak_file
- next_stage Generator
-
- def input(file, line = 1)
- @file = file
- @line = line
- end
-
- def parse
- create.parse_file
- end
- end
-
- class StringParser < Parser
- stage :reak_string
- next_stage Generator
-
- def input(string, name = "(eval)", line = 1)
- @input = string
- @file = name
- @line = line
- end
-
- def parse
- create.parse_string(@input)
- end
- end
- end
-end

0 comments on commit bf1602b

Please sign in to comment.