-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implement RST visitor #211
Labels
C-enhancement
Category: Adding or improving on features.
L-vlog
Language: Verilog and SystemVerilog.
Comments
fabianschuiki
added
L-vlog
Language: Verilog and SystemVerilog.
C-enhancement
Category: Adding or improving on features.
labels
Oct 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-enhancement
Category: Adding or improving on features.
L-vlog
Language: Verilog and SystemVerilog.
At the moment we have the AST and a corresponding visitor on that AST. The
ResolutionVisitor
, which ensures all names have been resolved and, more importantly, diagnostics related to names have been emitted early, uses thisast::Visitor
. The AST however contains ambiguities, which now shows up for example inSubroutinePort
. Resolving names is possible for one variant of the ambiguity (anonymous port with a named type), but not possible for the other (named port with implicit type). TheResolutionVisitor
should rather be arst::Visitor
, which goes over the AST with resolved ambiguities.It's not yet quite clear how to do this. Intuitively one would want to "inherit" from the
ast::Visitor
and "override" a few of the callbacks (the ones which may walk over ambiguities) in order to resolve them up front before calling corresonding functions for the resolved node. Not sure how to do this in Rust without just re-implementing the whole trait, though.The text was updated successfully, but these errors were encountered: