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.redux
parent
379f5c5eef
commit
c6efb337f1
Loading…
Reference in New Issue