Skip to content

v0.5.4

Compare
Choose a tag to compare
@bd82 bd82 released this 05 Sep 20:53
· 1982 commits to master since this release

OR (alternation) parsing DSL method no longer requires an error message description argument.
It is now an optional argument.

so:

     $.OR([
        {ALT: function(){ $.CONSUME(GreaterThan)}},
        {ALT: function(){ $.CONSUME(LessThan)}}
      ], "error message description here");

becomes:

     $.OR([
        {ALT: function(){ $.CONSUME(GreaterThan)}},
        {ALT: function(){ $.CONSUME(LessThan)}}
      ]);

And the error message will be computed automatically:
"expecting one of: <GreaterThan, LessThan> but found: ...."