Commit Graph

25 Commits

Author SHA1 Message Date
Xi Ge
3afb5572c0 [RangeInfo] Add a field in ResolvedRangeInfo to indicate whether the range throws uncatched errors. rdar://30586209 (#7574) 2017-02-17 17:49:00 -08:00
Xi Ge
6b699d8855 SourceEntityWalker: keep track of type reference in extension declarations' openings. (#7192)
This is necessary when we want to differentiate between type reference
on extension declaration's start, e.g "extension A {}", and other
references of "A". NFC on existing functionality.
2017-02-01 17:09:01 -08:00
Xi Ge
602235ed52 [RangeInfo] Report the case when a continue/break statement is in the given range however the containing target is not. (#7157) 2017-01-31 11:37:24 -08:00
Xi Ge
e7a16bf246 [RangeInfo] Include a boolean value in the resolved range info to indicate whether the given range has more than one entry point. (#7150)
A classic multi-entry range is several case statements.
2017-01-30 13:42:34 -08:00
practicalswift
30a88d38e6 [gardening] Fix recently introduced typos 2017-01-06 21:16:02 +01:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Xi Ge
46eb3971f5 [RangeInfo] Some enrichment on reported range info. (#6475)
* [RangeInfo] Perform complete walk on the last node in a given range to avoid missing information due to early abort.

* [RangeInfo] For declared decls in a given range, report whether they are referenced outside of the range.

* [RangeInfo] Report the contained (topmost) ASTNodes inside a selected range.
2017-01-03 16:33:39 -08:00
Xi Ge
94851e25d7 [RangeInfo] Report the innermost decl context for the range under selection. (#6448) 2016-12-21 16:50:39 -08:00
Xi Ge
2312ccecac [RangeInfo] When reporting referenced decls in a given range, exclude those references accessed as members. 2016-12-20 17:11:22 -08:00
Xi Ge
14f968a5ed SourceEntityWalker: Add a parameter to visitDeclReference() describing the kind of the reference under visit. NFC 2016-12-20 14:30:02 -08:00
Xi Ge
dbefa60605 [RangeInfo] Report the type the selected code should be evaluated to. 2016-12-20 11:37:39 -08:00
Xi Ge
ba930deff2 [RangeInfo] When reporting referenced decls, also report the types of these references. 2016-12-19 17:16:17 -08:00
Xi Ge
87a4b8a07e [RangeInfo] When reporting referenced decls in a given range, exclude those whose decl context is out of the current file. 2016-12-19 16:01:44 -08:00
Xi Ge
eb80cdd8ce [RangeInfo] Report declared and referenced decls in a given range. 2016-12-19 13:27:20 -08:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01:00
Xi Ge
5e8d8da380 [Test] Add range-info test driver to swift-ide-test. NFC 2016-11-15 13:48:15 -08:00
Xi Ge
0e7b13a96e [SourceKit] Lessen assertion in the range resolver walker to allow early stop. rdar://29159963 2016-11-08 11:22:24 -08:00
Xi Ge
d6f8f142a7 [SourceKit] Teach range-info request to recognize single declaration and multi-statements. (#5672) 2016-11-07 16:54:48 -08:00
Xi Ge
ac3411234d [SourceKit] The initial implementation of range-info request.
Like cursor-info, range info (""source.request.cursorinfo"") answers some
questions clients have for a code snippet under selection, for instance, the type of a selected
expression. This commit implements this new quest kind and provides two
simple information about the selected code: (1) the kind of the
snippet, currently limited to single-statement and expression; and (2)
the type of the selected expression. Gradually, we will enrich the
response to provide more insight into the selected code snippet.
2016-11-03 16:07:04 -07:00
Ryan Lovelett
1384a394ed [SourceKit] Fix typo in sourcekitd-test error handler response
Currently if you type in a malformed `pos` argument it responds with:

    wrong pos format, it should be '<line>:<column'

After the change it responds with:

    wrong pos format, it should be '<line>:<column>'
2016-07-29 11:50:00 -04:00
Xi Ge
8cfefd35ce [libide] Finish related lib-ide work on generating type-interface, rdar://27306890. (#3501) 2016-07-14 08:48:28 -07:00
Xi Ge
a7e4cfd042 [SourceKit] Report container type USRs in the response to cursor-info request.
Typically, users jump to type-specific interface from a member of that type, for
instance, a.getSomething(). To generate the interface, we need to report the USR
of the container type of "getSomething()", which is the USR for the type of a,
 when cursor info is requested for this function call.
2016-07-12 15:50:18 -07:00
David Farler
a9297eed9f Rename llvm::markup namespace to swift::markup
This was naming was cargoed from long ago and this functionality isn't
directly related to LLVM, it's specific to Swift.
2016-04-10 13:46:25 -07:00
Ben Langmuir
4d9c9f6098 Move SourceEntityWalker into libAST NFC
It fits right in among our other AST walkers and lets us use it lower in
the stack than libIDE.
2016-04-01 14:14:06 -07:00
Xi Ge
5ca83d97a5 [InterfacePrint] Enhance ASTPrinter to support type-specific interface printing.
When users try to print the interface of a specific type (most often through cursor
infor query of SourceKit), we should simplify the original decls by replacing
archetypes with instantiated types, hiding extension details, and omitting
unfulfilled extension requirements. So the users can get the straight-to-the-point
"type interface". This commit builds the testing infrastructure for this feature,
and implements the first trick that wraps extension contents into the interface body.

This commit also moves some generic testing support from SourceKit to Swift.

Swift SVN r32630
2015-10-12 19:14:58 +00:00