-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Tasty API support for generating local symbols #8114
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
Comments
Adding |
How many other parts are missing? |
@bishabosha since #8291 covers local vals and #8090 covers local methods, the other main item is pattern binds. That is the introduction of the name ??? match {
case x => ???
} After that we've covered most of the local definitions that make sense. The remaining more "out there" items are local classes/objects, which would then need all the different kinds of class-level symbol for the fields. At that point you'd be able to synthesize essentially any kind of sub-program you like from a Tasty macro. |
Fix #8114: Add bind symbol and tree constructors
This issue is a generalisation of recent PR #8090, aiming to cover gaps in symbol generation that are not immediately relevant to that change. That change enables the generation of method symbols, including method parameters as consequence.
Remaining symbols the Tasty API should be able to generate are:
val
s (includingvar
s, etc)Several of these kinds of symbols can be hacked into existence by stealing them from quotes, but this means we can't directly control things like names, flags (and location information?). Especially since we now have
Symbol.newMethod
, it would be strange not to at least supportval
s and pattern binds. Local classes may be more complicated, so I will be experimenting with those last.I'll be writing up any ideas / progress here for comment.
The text was updated successfully, but these errors were encountered: