Skip to content

Instantly share code, notes, and snippets.

@hosiawak
Created June 30, 2011 18:04
Show Gist options
  • Save hosiawak/1056802 to your computer and use it in GitHub Desktop.
Save hosiawak/1056802 to your computer and use it in GitHub Desktop.
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