Created
June 30, 2011 18:04
-
-
Save hosiawak/1056802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parser < Stage | |
attr_accessor :transforms | |
def self.processor | |
case | |
when Rubinius.ruby18? | |
Rubinius::Melbourne | |
when Rubinius.ruby19? | |
Rubinius::Melbourne19 | |
when Rubinius.ruby20? | |
Rubinius::Melbourne20 | |
else | |
raise Exception, "no processor is defined for Parser compiler stage." | |
end | |
end | |
def initialize(compiler, last) | |
super | |
compiler.parser = self | |
@transforms = [] | |
@processor = self.class.processor | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment