norswap / autumn

A Java parser combinator library written with an unmatched feature set.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`ws()` throws NPE when `ws` isn't set

Kroppeb opened this issue · comments

ws says:
null by default, meaning no whitespace will be matched.

but the function ws() just tries to grab the parser, even if ws is null. I'd expect a null check and if it is indeed null return empty instead.

Excellent suggestion, and a quick fix too. I'll get around to that as soon as possible, otherwise feel free to submit a pull request.

Fixed by 8dfc763