-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualize strings / standalone visualizer #19
Comments
I think it would. I am assuming that for the first 2 steps, that can be saved to a settings, so that we don't have to do it every time we visualize a string. Also, because I'm unfamiliar with visualizers in general, how does that work when a I like the idea of being able to load a file in addition to pasting arbitrary text into a standalone application for a quick preview of the tree. I have a hunch that if I'm writing this from scratch and I'm doing lot of tweaks to my parser, I might need to be able to easily reload the parser/lexer after making changes to the grammar. Therefore, I see two possibilities:
|
Yes, absolutely.
Visual Studio has this little magnifying glass + dropdown, when hovering over an expression, or from the Watch and Locals panes. When you click on the magnifying glass, the previously used visualizer is shown, When you click on the dropdown, you can choose any of the installed visualizers for that particular type. RE reloading parser -- If the lexer or parser is coming from a DLL, this isn't an issue -- the DLL should be loaded only in order to parse and then unloaded. If the DLL is rebuilt in the meantime, the application would use the new DLL. RE lexing/parsing directly from |
I think that if the |
I was thinking more of VBAParser being a partial class, and thus can have additional, non-autogenerated members. The only way I can see to lex/parse directly from the In the far future I might consider writing an interpreter class for ANTLR grammars, that would create an actual instance of a parser class entirely at runtime, without needing any code-gen. (Probably using expression trees.) @bclothier If you have any other ides on how to go about this, I'd be very interested. |
You are correct about codegen creating the classes from the ‘option‘. Given that the classes are always ‘partial ‘, I think it is given that such visualization will be incomplete. As an option, you could enable the user to select an assembly instead of the codegen to get the full fidelity for the visualization. |
This is the shared workflow for:
string
type(within the debugging visualizer, this would be set by calling code)
VisualizerData
classfrom returned parser rule context
@bclothier @retailcoder Does the above work for visualizing strings?
The text was updated successfully, but these errors were encountered: