Commit Graph

15 Commits

Author SHA1 Message Date
Xi Ge
17e49422e7 [libIDE] Refactor type-interface APIs. (#3537) 2016-07-15 15:59:22 -07:00
Xi Ge
fda0751cae [SourceKit] In interface-gen request, allow clients to send SourceKit an interested USR from which we can infer the group name. 2016-03-23 17:26:44 -07:00
Xi Ge
66fb8062fe ModulePrinting: For decls without doc-comment, we print the doc-comment associated with their conformances, if any.
Inspired by rdar://24409720
2016-03-21 14:35:32 -07:00
Xi Ge
bf1436a367 ASTPrinter: Move the logic for collecting all module groups from SourceKit to an IDE API, NFC. 2016-02-22 11:50:34 -08:00
Xi Ge
1872214d40 Swif-ide-test: add a parameter to specify the group names to print. 2016-02-19 17:21:28 -08:00
Xi Ge
7784ba959e ModulePrinter: allow module printer to print symbols from a specific group. 2016-02-09 11:49:16 -08:00
Xi Ge
ae60159816 [ModulePrint] Add the initial implementation for printing synthesized extensions.
For a concrete type, members from its conforming protocols' extensions can be hard
to manually surface. In this commit, when printing Swift modules, we start to replicate these
extensions and synthesize them as if they are the concrete type's native extensions.

Credit to Doug for suggesting this practice.
2016-02-02 14:53:21 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Xi Ge
6f33efd5f9 [InterfacePrinting] Printing non-doc comments at the beginning of a file, rdar://21710187.
When printing the interface extracted from a Swift file, we print every comments before
Swift code starts.

Swift SVN r29989
2015-07-08 20:10:57 +00:00
Doug Gregor
b8995b0aa3 Transform the Module class into ModuleDecl.
Modules occupy a weird space in the AST now: they can be treated like
types (Swift.Int), which is captured by ModuleType. They can be
treated like values for disambiguation (Swift.print), which is
captured by ModuleExpr. And we jump through hoops in various places to
store "either a module or a decl".

Start cleaning this up by transforming Module into ModuleDecl, a
TypeDecl that's implicitly created to describe a module. Subsequent
changes will start folding away the special cases (ModuleExpr ->
DeclRefExpr, name lookup results stop having a separate Module case,
etc.).

Note that the Module -> ModuleDecl typedef is there to limit the
changes needed. Much of this patch is actually dealing with the fact
that Module used to have Ctx and Name public members that now need to
be accessed via getASTContext() and getName(), respectively.

Swift SVN r28284
2015-05-07 21:10:50 +00:00
Argyrios Kyrtzidis
a586753f0f [IDE] Implement generating the Swift interface for an C/ObjC header
This translates clang arguments to swift ones, uses the bridging header
functionality to parse the provided file, and re-uses part of the module interface
printing implementation to print an interface for the header.

Part of rdar://19939192

Swift SVN r28062
2015-05-02 01:17:45 +00:00
Doug Gregor
1a6d27079d Module interface printing: add an option to skip the Swift overlay.
This is a debugging aid, not a general feature, hence the lack of
testing or actual, correct semantics.

Swift SVN r15886
2014-04-03 18:07:59 +00:00
Doug Gregor
8b684f3f7c Module interface printing: bring back printing of submodules.
Brings back the behavior removed in r15800 under a pair of flags
(-module-print-submodules and -module-print-hidden) that control
whether to print submodules, possibly including submodules that aren't
explicitly visible.

Swift SVN r15872
2014-04-03 16:10:11 +00:00
Dmitri Hrybenko
efb2a60ee7 Module interface printing: add a libIDE API to print a Clang submodule
Swift SVN r15730
2014-04-01 14:51:58 +00:00
Dmitri Hrybenko
7e294eea4d Module interface printing: print imported Clang declarations in header source
order

rdar://problem/16408837


Swift SVN r15505
2014-03-26 11:36:25 +00:00