-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Post typer transformer #64
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
Needs new TypeRef creation method that works for NoPrefix and at the same time does not need a denotation. This is provided by method TermRef.withNakedSymbol.
/** A trait that's assumed by the transformers that run right after typer. | ||
* Ensures that trees are normalized when seen by other transforms. This means: | ||
* (1) All module class definitions appear after their companion class definitions | ||
* (2) There are no import clauses or named arguments |
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.
Why do we need this?
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.
Just to reduce variety of types of trees which can be seen during transformations.
This is performed after the "Frontend" phase, so IDEs and, possibly, quasiquotes, should be able to see NamedArgs and Imports.
1) reorders companion objects so that they allways follow matching classes 2) removes imports and named arguments 3) rewrites all trees holding types are to TypeTrees
Added a prepareForStats&transformStats pair of methods, which provide a convinient way to alter scopes of PackageDefs, Templates and Block's.
A transformer that provides a convenient way to create companion objects.
LGTM now. |
LGTM |
Transformer that simplifies life of Transforms by: