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.
* [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.
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.
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>'
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.
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