Is it possible to recover PortConnectionSyntax (or .name) from a PortConnection? #1331
Unanswered
hankhsu1996
asked this question in
Q&A
Replies: 2 comments
-
|
Hmm, I think you should be able to call getExpression(), get the syntax node from that (which should be the connection's ExpressionSyntax), and then walk up the syntax tree until you find the PortConnectionSyntax. This probably won't work for implicit connections right now, since only the SourceRange is stored, but that could probably be fixed without too much work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks! That makes sense. Just to add, not just implicit connections. Explicit ones like |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
In the following SystemVerilog code:
From InstanceSymbol, I can access the resolved PortConnection for the
submodule_clkport. However, I need to get back to the actual syntax (.submodule_clkpart) so I can provide a definition location for that token.But it seems
conn.nameis not preserved or available. Is there any way to recover the original PortConnectionSyntax or equivalent syntax node from the resolved PortConnection?Beta Was this translation helpful? Give feedback.
All reactions