benjamin-hodgson / Pidgin

A lightweight and fast parsing library for C#.
https://www.benjamin.pizza/Pidgin/
MIT License
914 stars 70 forks source link

Should `DecimalNum` return `decimal` instead of `int`? #154

Closed Odonno closed 8 months ago

Odonno commented 8 months ago

I noticed that DecimalNum is used for integer discovery. Is it intended? Should it not return a decimal like expected? Maybe by creating a IntegerNum parser if there isn't any for int discovery.

benjamin-hodgson commented 8 months ago

"Decimal" means "base ten".

Odonno commented 8 months ago

I see. Still feel a little confusing.

Thank you for your answer Benjamin.