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
LexicalPreservingPrinter: Unsupported operation - remove() #866
Comments
Yes the "unexpected order" to say it nicely with your words :) is kind of the problem with our legacy code (problably not only ours) that is why I would like to refactor some things mostly automatically but keep everyhting else in place, hence it would be nice to use the LexicalPreservingPrinter for this. |
I think we have two options to resolver this:
The first one should be relatively easy. What do you think? |
I think modifiers can be found in many places (about ten,) so it should be fixed everywhere. I can't think of another place where things can be mixed like this, so it can be a solution specific to modifiers and annotations. |
Ok, a solution is almost ready. The only issue is now related to whitespace reconciliation: I get an extra whitespace... I introduced a new concept named CsmMix to handle CsmElement that can be in random order. It is quite tricky because we want to understand how the position of new elements is related to position of old elements to determine the right order. |
Not sure about this one, if it even is supposed to work like that, but I just put together some quick test of a specific use case I would like to use the LexicalPreservingPrinter for.
Basically "moving" some Annotations around by first removing them and adding them again.
The test I put together (copy of LexicalPreservingPrinterTest.handleOverrideAnnotation) fails with...
The test case
Kind regards
The text was updated successfully, but these errors were encountered: