Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
PegTokenizer.prototype.compileTokenizer = function(ast, compileOpts = {}) {
var compiler = PEG.compiler;
var env = this.env;
// Don't report infinite loops, i.e. repeated subexpressions which
// can match the empty string, since our grammar gives several false
// positives (or perhaps true positives).
var passes = {
check: [
compiler.passes.check.reportMissingRules,
compiler.passes.check.reportLeftRecursion,
],
transform: [
compiler.passes.transform.analyzeParams,
],
generate: [
compiler.passes.generate.astToCode
],