yoheimuta / go-protoparser

Yet another Go package which parses a Protocol Buffer file (proto2+proto3)
MIT License
166 stars 20 forks source link

Add ParseError type. #41

Closed PaulSonOfLars closed 4 years ago

PaulSonOfLars commented 4 years ago

Added a specific error type to return when reporting parsing errors, such as to be able to inspect them in more detail. No formatting should be affected by this change.

This is required to stop linting from stopping on parse errors in the following FR: github.com/yoheimuta/protolint/issues/101

PaulSonOfLars commented 4 years ago

Having played with this some more, it seems clear this is no trivial issue and probably requires some better knowledge of the overall project structure. If you have any ideas on returning this ParseError nicely throughout all three occurrences, preferably returning line/column/filename, please go ahead; I think I'll need some more context first.