AndrasKovacs / flatparse

Fast parsing from bytestrings
MIT License
146 stars 12 forks source link

Support anyAsciiDecimal variants for specific bit sizes. #58

Open iand675 opened 6 months ago

iand675 commented 6 months ago

Loving the library so far!

One small request:

At present, anyAsciiDecimalWord, and anyAsciiDecimalInt are the only options exposed for ASCII decimal parsing, but it would be nice if equivalent functions were provided for Word8, Word16, etc.

raehik commented 6 months ago

For smaller numeric types, you can fmap fromIntegral. The naming scheme would fit for us to provide those definitions however, and we could do better bounds checking, so this seems reasonable.