sebastienros / parlot

Fast and lightweight parser creation tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation should make it clear that NumberOptions needs to be set to AllowSign in order to parse negative values

pmarflee opened this issue · comments

The Integer and Decimal examples in the documentation are incorrect. They give the impression that Terms.Integer() and Terms.Decimal() will successfully parse negative values. However, parsing negative values requires NumberOptions to be set to AllowSign, e.g. Terms.Integer(NumberOptions.AllowSign).

Please submit a PR

I'll check the source to be sure it's intentional. Seems weird. Might be a bug more than a lack of documentation.

I fixed the documentation, this was intentional.