-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable macros in any transparent def #4823
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
e11b714
to
16a463f
Compare
dea5b08
to
c27ca82
Compare
Now all levels are relative to the definition site. 0 is the level of all non-staged definitions, -1 is the level of the contents of a top level splice (in an inline method) and positive levels are (as before) staging levels.
Allow top-level ~ in and non static transparent method: * Class methods (including inner and anonymous classes) * Methods in def/val/var
Rebased on master |
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.
Looks good
@@ -103,14 +103,16 @@ class ReifyQuotes extends MacroTransformWithImplicits { | |||
/** The main transformer class | |||
* @param inQuote we are within a `'(...)` context that is not shadowed by a nested `~(...)` | |||
* @param outer the next outer reifier, null is this is the topmost transformer | |||
* @param level the current level, where quotes add one and splices subtract one level | |||
* @param level the current level, where quotes add one and splices subtract one level. | |||
* The initial level is 0, a level `l` where `l > 0` implies code has been quotes `l` times |
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.
"Quoted"
* @param level the current level, where quotes add one and splices subtract one level | ||
* @param level the current level, where quotes add one and splices subtract one level. | ||
* The initial level is 0, a level `l` where `l > 0` implies code has been quotes `l` times | ||
* and `l == -1` is code inside a top level splice (in an transparent method). |
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.
"in a"
Based on #4822.
Allow top-level ~ in and non static transparent method:
Followed by #4826.