Skip to content

Print quotes with ' rather than Expr.apply #5696

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

Merged
merged 3 commits into from
Jan 14, 2019

Conversation

nicolasstucki
Copy link
Contributor

Also add coloring for clearer visualization of the code

Also add coloring for clearer visualization of the code
Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

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

This will not work for untyped tree (e.g. -Xprint:parser)

@nicolasstucki
Copy link
Contributor Author

It currently only works for untyped tree as those are still Quote trees. That is I added the special case for typed quotes (i.e. calls to scala.quoted.{Expr, Type}.apply).

https://github.com/lampepfl/dotty/blob/8d8c03fc7cf0d4b58d6a59dcb9a7a7ac1c635f83/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala#L565-L566

I will add coloring to the untyped ones to make them look the same.

@biboudis biboudis dismissed allanrenucci’s stale review January 14, 2019 17:10

Seems good now the check is added

@biboudis biboudis merged commit 9333e77 into scala:master Jan 14, 2019
@biboudis biboudis deleted the improve-quote-printer branch January 14, 2019 17:12
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.

3 participants