mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When performing an insertion (replacement length = 0) inside an existing annotation, we were forming a closed range instead of a half-open range, causing us to shift the effected token instead of throwing it out. There were also no tests for this functionality, so add a bunch of annotations tests. One area thing that is not tested is what if there have been multiple edits since the tokens were created. This is difficult to engineer, because right now making an edit immediately removes the semantic tokens and returns them. It could happen if the AST build takes longer than the edits, but there is no way to guarantee that in the current API. rdar://65748892
91 KiB
91 KiB