Commit Graph

16 Commits

Author SHA1 Message Date
Alex Hoppen
d6fc0807c1 [incrParse] Adjust expected reparse region for simple test case 2018-10-11 18:00:56 +02:00
Nathan Hawes
5c568af436 [incrParse] Fix bug mapping a node's location back to its location in the cached syntax tree
Also fix Edit::intersectsOrTouchesRange check only returning true when the
ranges overlapped, rather than when they overlapped or 'touched'.

Resolves rdar://problem/45108439
2018-10-08 15:44:38 -07:00
Alex Hoppen
3801bb0e42 [SwiftSyntax] Remove SwiftSyntax from the main swift repository
It has moved to its own repository at https://github.com/apple/swift-syntax
2018-08-30 11:46:22 -07:00
Alex Hoppen
da7cdbb122 [libSyntax] Add test cases for ByteTree serialization and deserialization 2018-08-21 10:55:15 -07:00
Alex Hoppen
d926b74836 [incrParse] Add test cases to test the incremental syntax tree transfer 2018-07-24 16:32:23 -07:00
Alex Hoppen
d9d5afd15a [incrParse] Refactor the test utility to be more modular
This way we can use the same core of the test utility to verify
round-tripness of incrementally transferring the syntax tree to
swiftSyntax.
2018-07-19 14:47:58 -07:00
Alex Hoppen
1b3baf908f [incrParse] Add error nodes to the end of a CodeBlockItem
Creating a new CodeBlockItem meant that when doing an edit in the error
nodes, the prefix gets reused and thus the code is parsed as invalid
although it is not.
2018-05-22 09:07:55 -07:00
Alex Hoppen
b2ebc96510 [incrParse] Reparse a node if the next leaf node has been modified 2018-05-22 09:07:55 -07:00
Alex Hoppen
17c14a0c48 [incrParse] Add some more tests 2018-05-22 08:52:39 -07:00
Alex Hoppen
c31a880a47 [incrParse] Allow whitespaces to be reparsed in test
This greatly improves the ergonomics of writing tests and outweighs the
ability to test which whitespaces get parsed since their parsing
overhead should be minimal.
2018-05-22 08:52:38 -07:00
Alex Hoppen
9bdc54a29c [incrParse] Add support for test cases that verify the reused regions 2018-05-22 08:52:38 -07:00
Alex Hoppen
6b3ac23d65 [incrParse] Allow testing of multiple edits per line 2018-05-22 08:52:37 -07:00
Alex Hoppen
ef69e416d3 [incrParse] Add some more passing tests 2018-05-22 08:52:36 -07:00
Alex Hoppen
ec4a527c44 [incrParse] Reparse nodes if the next node's trailing trivia has changed 2018-05-22 08:52:36 -07:00
Alex Hoppen
bc5e4d709a [incrParse] Compute byte offsets of pre-edit file based on that file 2018-05-22 08:52:35 -07:00
Alex Hoppen
a1ff223497 [incrParse] Add utility to test incremental parsing 2018-05-22 08:52:35 -07:00