Skip to content

Expr.quote, Expr.splice, etc are not looking at context and always rewriting trees on Scala 3 #134

@MateuszKubuszok

Description

@MateuszKubuszok

We need to rewrite trees on untyped-tree phase, because later we cannot turn Expr.quote {} into '{} etc.

But this it not aware of a context, and each code looking like Expr.quote/Expr.splice will be rewritten.

Probably something like would be needed:

  • during untyped tree phase
    • create rewritten tree part
    • create a "tuple" of sort (rewrittenTree, originalTree)
  • after/during type checking
    • check if the symbols points to Cross-Quotes
    • pick rewritten tree if they do, restore the original tree if they don't

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:cross-quotesImprovement/fix to Cross-Quotes functionalityhelp wantedExtra attention is neededholding out for a heroIt's not impossible, but life is too short to do this to oneself for freeissue-type:bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions