-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add defTree field to symbols
#5131
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
Conversation
86620c9 to
6a5aec8
Compare
As a first step, rename all occurrences of `rewrite` to `inline`.
Analogous to `&` and `|`, treat `inline` as an identifier but intrepret it specially if it appears in places where it influences the syntax. This allows us to keep `@inline` as an annotation.
Rename `tree`, `trees` and associated methods in `ClassSymbol` to `rootTree`, `rootTrees`. We want to add another tree field to symbols that points directly to the symbol's definition tree. So we should be more specific about `rootTree`.
6a5aec8 to
819d9f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this is the tree before Post typer has transformed it. Hence it does not match the tree that is pickled. Previously I loaded stored it inside of pickler.
|
I saw the issue with a def that contained inlined code. The call of the |
| val sym = tree.symbol | ||
| sym.registerIfChild() | ||
| sym.transformAnnotations(transformAnnot) | ||
| sym.defTree = tree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I referred to this tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an alternative fix in 241122e of #5138. @nicolasstucki can you review this one?
|
I have a fix in f3885ac. |
|
This PR and a proposed fix is part of #5138. |
Add a
defTreefield that gets set for certain symbols.Some possible uses: