pegjs/lib/compiler/passes
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.
2013-08-17 14:16:48 +02:00
..
generate-bytecode.js Fix bytecode built for nested sequences inside actions 2013-08-17 14:16:48 +02:00
generate-javascript.js Merge pull request #196 from vrana/comma 2013-08-16 11:34:45 -07:00
remove-proxy-rules.js Move options handling from passes to |PEG.compiler.compile| 2013-01-06 10:32:52 +01:00
report-left-recursion.js Make |GrammarError| require work also in the browser version 2013-01-05 21:16:36 +01:00
report-missing-rules.js Make |GrammarError| require work also in the browser version 2013-01-05 21:16:36 +01:00