-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
get rid of snapshotLength and hasNewContent #1576
get rid of snapshotLength and hasNewContent #1576
Conversation
I wonder that conditions detecting whether |
I was myself quite surprised that it works out-of-the-box! |
scan(target); | ||
if (printer.getPrinterHelper().hasNewContent()) { | ||
// the implicit drives the separator | ||
if (!target.isImplicit()) { | ||
printer.writeSeparator("."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move scan call above into this if block?
Then it is clear when it produces output.
And please uncomment the last line of token writer printer test. It should pass now. |
scan(invocation.getTarget()); | ||
if (printer.getPrinterHelper().hasNewContent()) { | ||
if (invocation.getTarget() != null && !invocation.getTarget().isImplicit()) { | ||
printer.writeSeparator("."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this call of scan?
It is OK for me. Let me know if you are finished. I will merge it then. |
I'm done, you can merge, thanks.
|
fix #1567