Hejsil / zig-clap

Command line argument parsing library
MIT License
939 stars 67 forks source link

Report error context in Diagnostic #26

Closed Hejsil closed 3 years ago

Hejsil commented 4 years ago

This is the work that will close #6. Right now the new Diagnostic struct only contains a Names struct that will either contain the param.names in cases where there was an error parsing a specific parameter, or the name of an argument in case the argument doesn't match any parameter. I'll need to also create a function on Diagnostic called report that will be the default way of reporting a parsing error to a stream.