You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
David Majda c6efb337f1 Fix bytecode built for nested sequences inside actions
In the bytecode generator, the |context.action| property wasn't
correctly reset when generating bytecode for sequence elements. As a
result, when a sequence was wrapped in an action and it contained
another sequence as an element, the generator thought that the inner
sequence was wrapped in an action too.

For example, the following grammar:

  start = ("a" "b") "c" { return "x"; }

was compiled as if it looked like this:

  start = ("a" "b" { return "x"; }) "c" { return "x"; }

This commit fixes the problem by resetting |context.action| correctly.

Fixes GH-168.
11 years ago
..
compiler Fix bytecode built for nested sequences inside actions 11 years ago
compiler.js Plugin API: Split compiler passes into stages 12 years ago
grammar-error.js Git repo npmization: Make the repo a npm package 12 years ago
parser.js Regenerate src/parser.js 11 years ago
peg.js Plugin API: Split compiler passes into stages 12 years ago
utils.js Fix typo in comment 11 years ago