error enum and an owning error type. #400
Unanswered
scriptandcompile
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on trying to integrate error reporting to my VB6 parser.
I've got two types involved with my errors.
VB6ErrorKind which is an enum containing the actual error information specific to the current error:,ie:
etc, etc, to a frankly a ludicrous number of error variants, growing as my parsing expands. Still, useful and returns exactly what I care about.
Secondly, I have VB6Error which contains everything involved with reporting as far as I can see, ie:
Now this reports the error correctly when I use #[error("{kind}"] - that is the error message on the enum - but for the life of me I can not get my source code to display!
I've got a new method for VB6Error which handles filling out VB6Error (a NamedSource and a SourceSpan with a SourceOffset) but I don't get any snippet.
Just this kind of output (specific to whichever variant is in kind:
Error: × Winnow ErrorAny suggestions or help?
I'd also like to get src using &str instead of String, but that's way down on my list of priorities.
Beta Was this translation helpful? Give feedback.
All reactions