Closed DavidDudson closed 6 years ago
Ready for merge now
Added companion behavior.
Instead of having a method
def manipulate(clazz: Defn.Class, companion: Defn.Obj)
to have the companion avaliable... Instead we just can call
clazz.companionObject
To find the companion for a given class/trait/type.
This is useful for both generator authors, and our backend.
Just added Companion and transmutation generators.
All that's left is input parameters on the annotations and we have more functionality than scalameta/paradise.
It's a little fragile for my liking due to restrictions of scalameta at present.
Next up I will need to create the SBT plugin
@xeno-by You might want to have a look. Any suggestions welcome.
Considering the pain that we went through with desugaring etc. This has been relatively tiny and painless soo far.
It would be helpful to add // Optimization: ... comments where applicable. I would be careful about too eager optimizations, since the performance bottleneck is likely to origin from an unexpected place.
There's only 2 optimizations.
I want to split this class into a few subfiles. So I will do that before merge. I also want to change the namespace to scala.meta.gen if possible while I am at it.
I'm going to push this, even though it is not production ready. It's going to get increasingly hard to review and this patchset is already large enough. I'm going to change Runner
again soon and change the tree traversal slightly. We should be able to get rid of mutability.
DO NOT MERGE.
I broke some things....
Stopping for the day, updates tomorrow