Xi Ge
64efa48c65
[SourceKit][DocInfo] When the underlying type of a type alias decl exists, report the conformances of the underlying type. rdar://26408167 ( #3394 )
...
Showing only the conforming associated types provides
little information to doc viewers. This patch digs the
underlying type of an associated type to report the
conformance info of those.
2016-07-07 16:24:01 -07:00
Jorge Bernal
0a3f913b20
SE-0070: Make Optional Requirements Objective-C-only.
...
Optional protocol requirements now require an explicit @objc attribute.
Fixes SR-1395
2016-05-06 11:05:52 +02:00
Xi Ge
c4d7b1a185
ASTPrinter: never synthesize extensions for raw types of enum decls.
...
Even thought raw types are specified in inheritance clauses, their
members are not usable through an enum instance. Thus, there is no
point to synthesize their members.
2016-04-22 22:52:46 -07:00
Jordan Rose
7ad6a8bd61
[test] Fix SourceKit tests for 2e38280.
...
Also filed <rdar://problem/25858559> "SourceKit response info for
enum shouldn't include members of the raw type" to keep it from
happening again.
2016-04-21 11:50:27 -07:00
Michael Buckley
daa4714864
Merge branch 'master' into int-from-unsafepointer
2016-04-13 20:44:08 -07:00
Michael Buckley
8e8e61b0bc
Add inititializers to Int and UInt which take UnsafePointers and UnsafeMutablePointers
2016-04-12 20:03:11 -07:00
David Farler
fbc220a036
Revert "Revert "Enable cmark smart punctuation in doc comments""
...
This reverts commit f723b86614 and
updates the IDE tests that incidentally included some punctuation.
No new tests are necessary - the character level tests are exercised
in cmark itself.
2016-04-10 13:32:43 -07:00
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04:00
Xi Ge
ca93fa6d1b
[SourceKit] DocInfo: Explicitly report the optionality of protocol members in response. rdar://25129725
2016-04-01 14:55:11 -07:00
Xi Ge
8afcf65fa2
[SourceKit] DocInfo: Update the UIdent for synthesized extensions to respect the synthesized targets instead of the original extended types.
2016-03-31 18:12:53 -07:00
Xi Ge
126bc4e942
[SourceKit] DocInfo: For synthesized extension, update their extended fields to the synthesized target instead of their original extended types. rdar://25439820
2016-03-31 17:53:21 -07:00
Xi Ge
61248dec24
[SourceKit] DocInfo: Fixing a paired-callback mismatch issue when merging nominals with extensions. rdar://25431244
2016-03-31 12:43:34 -07:00
Xi Ge
37f5a0390a
[SourceKit] DocInfo: Add a new entry to indicate the default implementation of a protocol member in its extensions. rdar://25032869
2016-03-30 14:26:17 -07:00
Xi Ge
b4d0cb4ffe
ModulePrinting: Avoid printing duplicated members in synthesized extensions.
2016-03-23 15:19:16 -07:00
Xi Ge
b3cde464dd
[SourceKit] For consistency, using underscore instead of hyphen in recently introduced key names. NFC
2016-03-22 22:21:56 -07:00
Xi Ge
760c2f12cf
[SourceKit] Update the way of representing USRs for synthesized extensions.
...
Instead of using 'key.usr' and 'key.synthesizedusr', we start to use 'key.usr' and 'key.original-usr' so
that 'key.usr' is consistently being the unique ID for a code entity.
2016-03-22 15:38:41 -07:00
Xi Ge
f338bdfbb7
[SourceKit] Incorporate synthesized extensions into DocInfo request. rdar://24912860
...
This commit reuses our code for generating synthesized extensions from module printing to enhance
documentation generation.
2016-03-22 14:49:22 -07:00
Xi Ge
5168083bf3
ModulePrinting: Print new lines between members of a decl.
2016-03-11 12:26:04 -08:00
Ben Langmuir
65f0e7eb94
[SourceKit] Add annotation tags for generic type requirements
...
Each requirement gets tagged. We could also tag the whole where clause
if we need to, but so far it hasn't been interesting.
rdar://problem/24292226
2016-03-03 16:11:07 -08:00
Ben Langmuir
c934315315
[SourceKit] Update terminology in generic parameter tag names
...
And add a test that does cursor info on the generic parameter itself,
not just on the parent decl context.
rdar://problem/24292226
2016-03-03 13:34:16 -08:00
Ben Langmuir
1182e41e01
[SourceKit] Add tags for generic parameters to annotated decl
...
Like typerefs, we want to show the USR in the tag.
rdar://problem/24292226
2016-03-03 12:47:09 -08:00
Ben Langmuir
d88d5052aa
[SourceKit] Use keyword name context to add syntaxtype.keyword tags
...
We can now markup most keyword uses. Still missing access control
keywords.
rdar://problem/24292226
2016-03-02 18:20:59 -08:00
Ben Langmuir
8955cdc644
[SourceKit] Add decl.var.type tags in property declarations
...
These Type::print can just reuse the printTypeLoc logic even if they
don't have a TypeRepr.
rdar://problem/24292226
2016-03-01 16:49:33 -08:00
Ben Langmuir
b4469d88dc
[SourceKit] Replace decl.name with syntaxtype.keyword as appropriate
...
We aren't ready to start marking up all keywords yet, but start by
replacing the cases where we currently have decl.name.
rdar://problem/24292226
2016-03-01 15:35:26 -08:00
Ben Langmuir
10c8250352
[SourceKit] Rename local/external to name/argument_label in annotation
...
rdar://problem/24292226
2016-03-01 15:16:40 -08:00
Ben Langmuir
1a83912c4e
[SourceKit] Add fully annotated declaration to DocInfo requests
...
Also expose the printing function as a SwiftLangSupport static method.
Ideally we could move this into libIDE, but it currently depends on the
UIdent visitor to get decl-specific tag names and it's not obvious how
we should hoist/abstract that out in a nice way.
rdar://problem/24292226
rdar://problem/24292304
2016-02-25 20:12:13 -08:00
Ben Langmuir
efafb7e98a
[ASTPrinter] Remove space between subscript and parameter list
...
To match the style of TSPL, documentation, the stdlib, etc. Found by
inspection.
2016-02-12 16:23:41 -08:00
Doug Gregor
38c1de69e4
Reinstate "[SR-511][Parse] Add 'associatedtype' keyword and fixit"
...
This reverts commit ce7b2bcf09 , tweaking
a few validation tests appropriately (1 crasher fixed, two -verify
tests that needed updating).
2016-01-14 00:21:48 -08:00
Erik Eckstein
ce7b2bcf09
Revert "[SR-511][Parse] Add 'associatedtype' keyword and fixit"
...
This reverts commit 2b2e9dc80e .
It broke some compiler crasher tests
2016-01-13 20:42:58 -08:00
gregomni
2b2e9dc80e
[SR-511][Parse] Add 'associatedtype' keyword and fixit
...
Adds an associatedtype keyword to the parser tokens, and accepts either
typealias or associatedtype to create an AssociatedTypeDecl, warning
that the former is deprecated. The ASTPrinter now emits associatedtype
for AssociatedTypeDecls.
Separated AssociatedType from TypeAlias as two different kinds of
CodeCompletionDeclKinds. This part probably doesn’t turn out to be
absolutely necessary currently, but it is nice cleanup from formerly
specifically glomming the two together.
And then many, many changes to tests. The actual new tests for the fixits
is at the end of Generics/associated_types.swift.
2016-01-13 17:54:31 -08:00
Xi Ge
d53c91c087
[SourceKit][DocInfo] Being consistent of the printed source and the reported annotation when the decl under request is an extension to a name alias type. rdar://22098995
2016-01-07 12:13:40 -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