Dmitri Hrybenko
164b5829ea
Code completion for overrides: don't suggest to override members of the current
...
nominal
Swift SVN r16822
2014-04-25 14:46:58 +00:00
Dmitri Hrybenko
014d42acb0
Remove WIP that I accidentally committed
...
Swift SVN r16821
2014-04-25 14:45:17 +00:00
Dmitri Hrybenko
a701104732
Code completion: add a test that produces wrong results now
...
Swift SVN r16820
2014-04-25 14:35:44 +00:00
Dmitri Hrybenko
3ee34efee4
Code completion: complete declarations that are required for declared protocol
...
conformances
rdar://16539292
This is a hack in visible decl lookup. The general solution that would also
improve type checker errors would be to make the type checker keep these broken
conformances and syntethize missing declarations to make downstream code type
check. For that, see:
<rdar://problem/16723339> [QoI] Type checker should not be dropping protocol
conformances explicitly spelled in the source
Swift SVN r16818
2014-04-25 14:03:39 +00:00
Dmitri Hrybenko
35c587aadf
Code completion: don't complete associated types on non-metatypes
...
Swift SVN r16817
2014-04-25 12:46:32 +00:00
Dmitri Hrybenko
f06d124ef9
Code completion: fix crash on invalid protocol conformance
...
rdar://16723481
Swift SVN r16815
2014-04-25 09:58:44 +00:00
Dmitri Hrybenko
b3851a79e2
REPL code completion: handle PreferredCursorPosition chunk
...
Swift SVN r16759
2014-04-24 18:15:55 +00:00
Dmitri Hrybenko
28c2514589
Remove unused member
...
Swift SVN r16756
2014-04-24 16:00:32 +00:00
Dmitri Hrybenko
e36baf4123
Code completion: add basic support for completing overriding decls
...
rdar://16539292
Swift SVN r16755
2014-04-24 15:59:05 +00:00
Dmitri Hrybenko
00722d4c2e
Comment parsing: extract parameter name from the text in :param: field
...
Swift SVN r16750
2014-04-24 09:13:42 +00:00
Dmitri Hrybenko
cfb3d287de
Comment to XML conversion: add pretty-printed declaration
...
Swift SVN r16698
2014-04-23 11:57:12 +00:00
Argyrios Kyrtzidis
9bd10774b0
[IDE/CodeCompletion] Mark a code-completion result as 'not-recommended' if the declaration
...
that it refers to is unavailable.
rdar://16675550
Swift SVN r16687
2014-04-23 04:26:14 +00:00
Argyrios Kyrtzidis
2db90e9105
[IDE] For the syntax node of functions, set the name range to the range of the function signature.
...
Swift SVN r16680
2014-04-23 00:24:11 +00:00
Dmitri Hrybenko
021b5b4561
Comment to XML conversion: pass through block markup as HTML tags, for the lack
...
of better markup in current XML schema
I know this XML is probably as bad as XML can get, but at least it allows
clients to render some block markup. I expect to replace this with some real
tags soon.
Swift SVN r16657
2014-04-22 17:15:46 +00:00
Dmitri Hrybenko
2812aba59c
Code completion: speed up by more than 2x
...
... at the cost of correctness, see test changes
This change was suggested by Argyrios.
But we still take 10 seconds to compute completion results for Cocoa.
Swift SVN r16599
2014-04-20 20:03:25 +00:00
Doug Gregor
09797f7f99
Introduce a new declaration node, ParamDecl, for function parameters.
...
Use this node to capture the argument name and its source location in
the AST. We're only building these in one place at the moment; the
rest will be updated soon.
Swift SVN r16581
2014-04-20 05:23:35 +00:00
Argyrios Kyrtzidis
2380966931
[IDE] Enhance ide::isSourceInputComplete() function to also return indentation information.
...
Patch provided by GregC.
Swift SVN r16552
2014-04-18 22:12:40 +00:00
Chris Lattner
7eb2a79d90
remove dead variable
...
Swift SVN r16546
2014-04-18 20:31:51 +00:00
Dmitri Hrybenko
e2e8db5f38
Migrate IB attributes to new decl attribute representation and fix a few bugs
...
along the way
Swift SVN r16542
2014-04-18 20:00:09 +00:00
Dmitri Hrybenko
a526517cec
Module interface printing: print all sub-sub-modules when instructed to do so
...
<<Darwin>>->isModuleVisible(<<Darwin.*>>) returns false for some reason,
and I am not sure if this is correct or not.
Swift SVN r16520
2014-04-18 14:14:20 +00:00
Argyrios Kyrtzidis
a0b97196f1
[IDE] Provide the declaration along with the SyntaxStructureNode.
...
Swift SVN r16504
2014-04-18 07:07:15 +00:00
Dmitri Hrybenko
6680ed3956
Comment parsing: for now, treat classes, protocols and structs as "class-like"
...
things
Swift SVN r16453
2014-04-17 16:13:47 +00:00
Dmitri Hrybenko
68e8fee5fc
Comment parsing: put more information into the generated XML documents
...
This commit adds infrastructure for conversion and testing it.
The conversion is still incomplete, pending discussion about which tags should
we use in the XML documents. I copied the RelaxNG schema from Clang, and will
edit it accordingly.
Swift SVN r16451
2014-04-17 15:42:51 +00:00
Argyrios Kyrtzidis
0ccc83db54
[IDE/ModuleInterface] Print a blank line between top-level Swift declarations.
...
Swift SVN r16442
2014-04-17 05:10:46 +00:00
Dmitri Hrybenko
70ed107d69
Code completion: extend the hack to complete function call patterns after left
...
paren to work with method calls on AnyObject and curried function calls
Swift SVN r16412
2014-04-16 13:42:55 +00:00
Dmitri Hrybenko
236c581de7
Code completion: complete "?.member" on T?, and ".member" on @unchecked T?
...
In order for Xcode to use these completions, we complete "?.member" when the
user has typed "anOptional.", but we also say that in order to apply this
result, N bytes to the left of the cursor should be erased first.
rdar://16579657 rdar://15233283
Swift SVN r16409
2014-04-16 10:50:14 +00:00
Dmitri Hrybenko
da41b2e766
Code completion: provide results for initializers after the left paren:
...
class A {
init(a: Int) {}
}
A(#^HERE^#
In its current state, this is a hack that I am not proud of. There is
potential here to provide such completions for all function calls:
class A {
func foo(a: Int) {}
func foo(a: Double) {}
}
A().foo(#^HERE^#
but this requires code completion doing its own name lookup, since the type
checker will give us an error type due to ambiguity of overloaded functions.
Type checker also sometimes gives up in cases like these:
struct A {
func foo() {}
}
A().foo
which is understandable, since we disallow partial applications of functions on
values, but returning the correct type here is useful for code completion.
rdar://16597372
Swift SVN r16367
2014-04-15 12:05:05 +00:00
Dmitri Hrybenko
0aeb095416
Code completion: change the spelling of DynamicLookupMethodCallTail chunk to "!"
...
This is the "!" in method calls on AnyObject:
var a: AnyObject = get()
a.doFoo!()
rdar://15233283
Swift SVN r16366
2014-04-15 09:36:50 +00:00
Dmitri Hrybenko
677d352ddd
Remove no-op and unused code from code completion that I have no idea about
...
Swift SVN r16365
2014-04-15 09:07:30 +00:00
Argyrios Kyrtzidis
a9ea63a7f7
[IDE/ModuleInterface] Adjust the indentation of regular comments to match the current indentation level.
...
Swift SVN r16362
2014-04-15 06:27:40 +00:00
Argyrios Kyrtzidis
f931674573
[IDE/ModuleInterface] Pick up the vertical spacing/grouping that is used in the clang module header.
...
Swift SVN r16294
2014-04-14 03:28:08 +00:00
Argyrios Kyrtzidis
31a620f1ee
[IDE/ModuleInterface] Fix erroneously printed newline between a regular comment and the declaration it is 'attached' to.
...
Swift SVN r16293
2014-04-14 03:28:05 +00:00
Argyrios Kyrtzidis
293d771905
[IDE] Add an option to skip printing declarations that start with '_', for the module interface.
...
rdar://16559411
Swift SVN r16272
2014-04-13 04:35:30 +00:00
Argyrios Kyrtzidis
ba30e56b58
[IDE] When picking regular comments from clang headers, make sure that extensions/categories
...
are printed in the right source location otherwise the comments will be out-of-place.
Swift SVN r16271
2014-04-13 04:35:29 +00:00
Argyrios Kyrtzidis
2da311cf1f
[IDE] For the module interface, don't print submodule imports, unless they are submodules
...
of the module we are printing.
rdar://16530804
Swift SVN r16262
2014-04-12 19:20:08 +00:00
Argyrios Kyrtzidis
49ef6ab8cd
[IDE] Use ClangNode::getLocation().
...
Swift SVN r16253
2014-04-12 16:33:39 +00:00
Argyrios Kyrtzidis
4c91bd074f
[IDE] Print out regular comments from the clang module headers, for the module interface.
...
rdar://16451119
Swift SVN r16249
2014-04-12 05:21:08 +00:00
Dmitri Hrybenko
547e1b5874
Code completion: print non-inout '@unchecked' optional arguments as normal
...
optionals, because the difference is not important for the caller.
rdar://16576739
Swift SVN r16212
2014-04-11 10:58:07 +00:00
Dmitri Hrybenko
a98375b286
Cleanup, NFC.
...
Swift SVN r16211
2014-04-11 10:44:10 +00:00
Dmitri Hrybenko
810afec04d
Fix coding style and formatting
...
Swift SVN r16210
2014-04-11 10:06:00 +00:00
Sonny Falk
407e538d85
[IDE] Make sure to handle the case of virtual-only attributes
...
for syntax coloring.
Add a test for the above.
This addresses <rdar://problem/16584438>.
Swift SVN r16194
2014-04-11 02:15:16 +00:00
Dmitri Hrybenko
7ac0db93a9
Module interface printing: don't print declarations from the Swift overlay when printing a submodule
...
rdar://16559404
Swift SVN r16117
2014-04-09 14:22:56 +00:00
Doug Gregor
9e75a46c8c
swift-ide-test: Add a -skip-unavailable option to skip unavailable declarations
...
Swift SVN r16056
2014-04-08 16:34:44 +00:00
Dmitri Hrybenko
f83a6c0c5a
AST printing: don't insist on having a Clang module in Swift-only modules
...
Swift SVN r15966
2014-04-04 23:59:51 +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
f4c018d3f7
Correct filename in the comment
...
Swift SVN r15801
2014-04-02 15:00:18 +00:00
Dmitri Hrybenko
d72109e97d
Module interface printing: don't print submodules (either implicit of explicit)
...
of the module being printed
rdar://16497611
Swift SVN r15800
2014-04-02 14:54:39 +00:00
Dmitri Hrybenko
78e354b2b9
AST printing: make PrintDefaultParameterPlaceholder the default (since we are
...
not going to implement expression printing any time soon), and fix a bug in its
implementation: when used with deserialized modules, "= default" was not
printed.
Swift SVN r15798
2014-04-02 13:56:54 +00:00
Dmitri Hrybenko
d68ad2c3c4
Simplify code
...
Swift SVN r15740
2014-04-01 17:34:00 +00:00