Commit Graph

7 Commits

Author SHA1 Message Date
Maurice Makaay 76336e883e Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
Maurice Makaay 98d2db0374 Moved Reader into its own package. 2019-06-07 10:55:55 +00:00
Maurice Makaay 6d92e1dc68 Merged functionality of p.Expects(string) and p.UnexpectedInput().
It is now simply p.UnexpectedInput(string). This makes the naming
of unexpected input not as magical, but explicit (which is a GoodThing).
With one of the earlier incarnations of parsekit it did make sense,
but it went in a way in which explicit is more idiomatic for the package.
2019-06-07 07:56:24 +00:00
Maurice Makaay 3094b09284 Adding documentation and getting the interactions between ParseAPI and TokenAPI cleaned up a bit. 2019-06-07 07:26:41 +00:00
Maurice Makaay 3d791233e0 Added a lot of IP-address-related TokenHandlers, so we can now process IPv4 addresses, IPv6 addresses, CIDR netmasks, IPv4 dotted quad netmasks, IPv4Net (ipv4 + mask) and IPv6Mask (ipv6 + mask). 2019-06-05 22:16:09 +00:00
Maurice Makaay 05585db341 Normalizing error handling, to always include the caller location in errors. This makes debugging a lot easier for users of the package, because it doesn't say stuff like 'Method() was called incorrectly', but instead something like 'Method() was called incorrectlty at /path/to/file.go:1234'. 2019-06-05 10:07:50 +00:00
Maurice Makaay 75373e5ed5 Big simplification run once more, cleaned up code, added tests and examples, made stuff unexported where possible, to slim down the exported interface. 2019-06-04 23:15:02 +00:00