Skip to content
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

Fix #204 #218

Merged
merged 3 commits into from Nov 24, 2017
Merged

Fix #204 #218

merged 3 commits into from Nov 24, 2017

Conversation

jindraivanek
Copy link
Contributor

Attempt to fix #204.

Problem in integrateComments was that block comment was also part of newTokens.

See also #217.

@odytrice
Copy link

Please could you explain a bit more about how you discovered and solved the problem? I've gone through your PR. What exactly do you mean by "Raw Comment"?
Thanks in advance

@jindraivanek
Copy link
Contributor Author

I put breakpoint in place where first "(" occurs (https://github.com/dungpa/fantomas/blob/master/src/Fantomas/TokenMatcher.fs#L589) and then follows what happens next. Turns out that alg got out of balance because on top of newTokens is Comment tokens, which is case that is not considered at all.

What I did, is in case of comments in newTokens just output it, while throwing out matching token from origTokens (assuming there is same comment token).

RawComment naming just follows used naming of things in newTokens, for example RawDelimeter or RawAttribute.

Copy link
Contributor

@dungpa dungpa left a comment

Choose a reason for hiding this comment

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

Thanks for the good work. Sorry for the delay.

@dungpa dungpa merged commit 97205a3 into fsprojects:master Nov 24, 2017
@jindraivanek jindraivanek deleted the issue-204 branch January 25, 2019 15:02
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.

Incorrect reformatting of comments
3 participants