diff --git a/lib/peg.js b/lib/peg.js index 68c8941..ed6b261 100644 --- a/lib/peg.js +++ b/lib/peg.js @@ -41,13 +41,13 @@ var peg = { var plugins = "plugins" in options ? options.plugins : [], config = { - parser: this.parser, - passes: convertPasses(this.compiler.passes) + parser: peg.parser, + passes: convertPasses(peg.compiler.passes) }; arrays.each(plugins, function(p) { p.use(config, options); }); - return this.compiler.compile( + return peg.compiler.compile( config.parser.parse(grammar), config.passes, options