Skip to content

Add string interpolator apply macro prototype #8572

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

nicolasstucki
Copy link
Contributor

This is just an example of how to encode String interpolator macros
that used an object with and apply and unapply in the extension class.

@nicolasstucki
Copy link
Contributor Author

@deusaquilus, you were trying to write an extension class with an inline method that also inlined the prefix. I found an encoding that works for that use case.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This is just an example of how to encode String interpolator macros
that used an object with and `apply` and `unapply` in the extension class.
@nicolasstucki nicolasstucki force-pushed the add-string-interpolator-macro-prototype branch from 6e073ae to 3a502e5 Compare March 20, 2020 12:53
// }
object XMLOps {
opaque type StringContext = scala.StringContext
def (ctx: scala.StringContext).xml: StringContext = ctx
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liufengyun I added this other alternative that looks much simpler to use. Could you quickly check it and merge if it is ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicolasstucki nicolasstucki merged commit 30f8c6f into scala:master Mar 20, 2020
@nicolasstucki nicolasstucki deleted the add-string-interpolator-macro-prototype branch March 20, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants