Method: Rattler::Compiler::ParserGenerator.code_for
- Defined in:
- lib/rattler/compiler/parser_generator.rb
.code_for(grammar, opts) ⇒ String .code_for(rules, opts) ⇒ String .code_for(rule, opts) ⇒ String .code_for(parser, opts) ⇒ String
Generate parsing code for parser using a new RubyGenerator with the given options and return the generated code.
103 104 105 |
# File 'lib/rattler/compiler/parser_generator.rb', line 103 def self.code_for(parser, opts={}) ::Rattler::Compiler::RubyGenerator.code(opts) {|g| generate g, parser, opts } end |