Skip to content

Pretty print quotes #4213

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 2 commits into from
Apr 9, 2018
Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@@ -51,4 +51,16 @@ class DecompilerPrinter(_ctx: Context) extends RefinedPrinter(_ctx) {
}
}
}

override protected def toTextCore[T >: Untyped](tree: Tree[T]): Text = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is not part of RefinedPrinter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it should

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we do not want this representation when debugging.

@nicolasstucki nicolasstucki force-pushed the print-quotes-for-users branch from cfb5ddd to 88ca3c1 Compare March 29, 2018 15:15
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.

Sorry, I forgot about this one

override protected def toTextCore[T >: Untyped](tree: Tree[T]): Text = {
import untpd.{modsDeco => _, _}
tree match {
case TypeApply(fun, args) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should have a protected def for each type of tree and override the bits we are interested in.,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it

@nicolasstucki nicolasstucki merged commit 74bcfd2 into scala:master Apr 9, 2018
@allanrenucci allanrenucci deleted the print-quotes-for-users branch April 9, 2018 12:18
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