pegjs/lib
David Majda 86769a6c5c Error handling: Make |?| return |null| on unsuccessful match
Before this commit, the |?| operator returned an empty string upon
unsuccessful match. This commit changes the returned value to |null|. It
also updates the PEG.js grammar and the example grammars, which used the
value returned by |?| quite often.

Returning |null| is possible because it no longer indicates a match
failure.

I expect that this change will simplify many real-world grammars, as an
empty string is almost never desirable as a return value (except some
lexer-level rules) and it is often translated into |null| or some other
value in action code.

Implements part of #198.
2013-12-01 16:12:35 +01:00
..
compiler Error handling: Make |?| return |null| on unsuccessful match 2013-12-01 16:12:35 +01:00
compiler.js Plugin API: Split compiler passes into stages 2013-01-13 19:08:06 +01:00
grammar-error.js Git repo npmization: Make the repo a npm package 2012-11-10 14:21:14 +01:00
parser.js Error handling: Make |?| return |null| on unsuccessful match 2013-12-01 16:12:35 +01:00
peg.js Plugin API: Split compiler passes into stages 2013-01-13 19:08:06 +01:00
utils.js Fix typo in comment 2013-07-25 14:27:50 -07:00