This creates a specific error type which can be used for error handling in other tools (eg protolint) instead of the current fmt.Errorf() setup.
Before merging, it should be decided whether we expect each component (scanner/lexer/parser) to have its own specific error type, or if one is enough.
The current design uses a single error type, to avoid extra boilerplate on external tools having to check multiple errors, and because they all seem to return the same (or very similar) data.
Let me know if you have any strong opinions regarding each option.
(And sorry for the large PR, most of it is boilerplate test code that needed editing😅)
This creates a specific error type which can be used for error handling in other tools (eg protolint) instead of the current
fmt.Errorf()
setup.Before merging, it should be decided whether we expect each component (scanner/lexer/parser) to have its own specific error type, or if one is enough. The current design uses a single error type, to avoid extra boilerplate on external tools having to check multiple errors, and because they all seem to return the same (or very similar) data.
Let me know if you have any strong opinions regarding each option.
(And sorry for the large PR, most of it is boilerplate test code that needed editing😅)