Commit Graph

7 Commits

Author SHA1 Message Date
Anthony Latsis
ea7662768e Parse: Use TypeRepr * instead of DeclNameRef in a note that points to an extension 2023-01-07 07:11:29 +03:00
fwcd
8d35ed0fe9 Update diags in SourceKit tests to include key.id
- Update SourceKit/DocumentStructure tests
- Update SourceKit/CursorInfo tests
- Update SourceKit/SyntaxMapData tests
- Update SourceKit/Sema tests
- Update SourceKit/CompileNotifications tests
2021-05-07 19:32:04 +02:00
Nathan Hawes
c0ee62be93 [syntax-coloring|test] Update test cases for new behaviour and address review comments 2017-09-14 21:34:22 -07:00
Nathan Hawes
6b9690ac5c [syntax-coloring] Rework the syntax map to use offset+length rather than start/end line+column and simplify the delta logic
This patch changes the syntax map data structure it uses to be offset based
rather than line/col based in order to avoid calling getLineAndColumn for the
start and end offset of every token. This removes the 30% of time spent in
getLineAndColumn for this request in large files (rdar://problem/28965123).

The logic for returning the affected range and the token ranges to highlight
following an edit also made several assumptions that no longer hold. This
patch changes it to compare the syntax maps from before and after the edit,
find the first mismtaching tokens from the start and end of the syntax maps
and return the tokens in that range (adjusted to line boundaries). This fixes
syntax highlighting issues with interpolated multi-line strings
(rdar://problem/32148117) and block comments.

With the above changes the per-keystroke time spent for syntax highlighting
(with sematic info disabled) dropped from ~80ms to just under 50ms for a
12KLOC file.
2017-09-14 21:34:21 -07:00
Daniel Duan
e0cc095063 [Parser] updated tests for "expected declaration" companion note 2016-02-19 11:05:03 -08:00
Chris Lattner
8d81349fe1 fix rdar://24029542 "Postfix '.' is reserved" error message" isn't helpful
This adds some heuristics so we can emit a fixit to remove extraneous
whitespace after a . and diagnose the case where a member just hasn't
been written yet better.  This also improves handling of tok::unknown
throughout the parser a bit.

This is a re-commit of ff4ea54 with an update for a SourceKit test.
2016-01-11 15:11:20 -08:00
Argyrios Kyrtzidis
8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00