Dmitri Hrybenko
be7d4ae71d
Code completion: fix a few crashes while code completing expressions that have
...
generic parameter lists
Swift SVN r6349
2013-07-18 18:37:58 +00:00
Dmitri Hrybenko
c22ac1dc06
lookupVisibleDecls() should operate on a canonical type so that it does not
...
need to unwrap the type sugar.
This was uncovered by the removal of IdentifierType and removal of
getCanonicalType() in code completion, which was working around
lookupVisibleDecls() not working for IdentifierTypes.
Swift SVN r6332
2013-07-17 18:28:52 +00:00
Dmitri Hrybenko
90889c391e
Handle ParenPattern in function arguments
...
It seems strange, but 'func f(_ : Int)' has a ParenPattern for its arguments,
but 'func f(a : Int)' has a TuplePattern.
Swift SVN r6311
2013-07-17 00:25:22 +00:00
Dmitri Hrybenko
858ce26b2b
Code complete expressions that type check to ArchetypeTypes
...
This required fixing a bug in lookupVisibleDecls(), which did not return any
results for ArchetypeTypes.
Swift SVN r6310
2013-07-16 23:49:25 +00:00
Dmitri Hrybenko
6aa7b63900
Remove unintended fallthrough in CompletionLookup::foundDecl
...
Swift SVN r6289
2013-07-16 17:03:51 +00:00
Dmitri Hrybenko
bed619073c
Code completion: produce results that refer to TypeAliasDecls
...
Swift SVN r6287
2013-07-16 02:04:37 +00:00
Dmitri Hrybenko
7823c53956
Code completion: produce results that refer to NominalTypeDecls from
...
expr-postfix that can be resolved
Swift SVN r6282
2013-07-16 01:44:21 +00:00
Dmitri Hrybenko
b8babd448e
Code completion: produce completion results which refer to NominalTypeDecls
...
Swift SVN r6279
2013-07-16 01:29:49 +00:00
Dmitri Hrybenko
e650f2f8fc
Implement basic code completion at the beginning of the expr-postfix
...
We produce only names that are found by name lookup, no keywords or types yet.
Swift SVN r6276
2013-07-16 00:49:08 +00:00
Dmitri Hrybenko
189ffc49a5
Code completion: don't crash on functions with selector-style arguments
...
Swift SVN r6269
2013-07-15 20:11:22 +00:00
Dmitri Hrybenko
6a0c6f4879
Code completion: use 'Void' instead of '()' in type annotations
...
Swift SVN r6265
2013-07-15 18:28:51 +00:00
Dmitri Hrybenko
98aaf3bb45
Add code completion for expr-super: 'super#^A^#' and 'super.#^A^#'
...
Swift SVN r6264
2013-07-15 18:11:48 +00:00
Dmitri Hrybenko
f19de086ca
Add code completion results for expressions that have function types
...
Fixes rdar://14431044
Swift SVN r6229
2013-07-12 23:42:15 +00:00
Dmitri Hrybenko
e89b90e797
Produce correct type annotations for '.metatype' completion strings
...
Swift SVN r6217
2013-07-12 22:07:03 +00:00
Dmitri Hrybenko
7b93a74a7e
Code completion: add type annotations to ".metatype" completion strings
...
Swift SVN r6216
2013-07-12 21:17:25 +00:00
Dmitri Hrybenko
034c9e370c
dump() output should go to errs(). Thanks, Jordan!
...
Swift SVN r6215
2013-07-12 21:07:16 +00:00
Dmitri Hrybenko
c80697e411
Add FIXMEs to code completion code.
...
Swift SVN r6214
2013-07-12 21:04:47 +00:00
Dmitri Hrybenko
bdf8768522
Don't track prefix while doing a code completion lookup.
...
Swift SVN r6213
2013-07-12 20:55:09 +00:00
Dmitri Hrybenko
f28d4a081a
Refactor CodeCompletionString and CodeCompletionResult stringification
...
functions to use raw_ostream like the rest of clang and swift. Also add a
comment that these functions are intended for debugging only.
Swift SVN r6212
2013-07-12 20:50:26 +00:00
Dmitri Hrybenko
3a7f5dfd94
Don't add SubscriptDecls to code completion results for a metatype base expression.
...
Swift SVN r6207
2013-07-12 18:40:19 +00:00
Dmitri Hrybenko
9b3ce25c17
Add code completion for constructors
...
Swift SVN r6203
2013-07-12 18:34:25 +00:00
Dmitri Hrybenko
c4f33c89a8
Add code completion for subscript operators
...
Swift SVN r6202
2013-07-12 18:03:15 +00:00
Dmitri Hrybenko
02084efab7
Implement code completion for some function calls and member variable accesses
...
in expr-dot and expr-postfix that can be typechecked without typechecking the
beginning of the function body.
Swift SVN r6198
2013-07-12 02:00:41 +00:00
Dmitri Hrybenko
3c5b12fc0f
Code completion: add a lot of infrastructure code
...
* Added a mode in swift-ide-test to test code completion. Unlike c-index-test,
the code completion token in tests is a real token -- we don't need to
count lines and columns anymore.
* Added support in lexer to produce a code completion token.
* Added a parser interface to code completion. It is passed down from the
libFrontend to the parser, but its functions are not called yet.
* Added a sketch of the interface of code completion consumer and code
completion results.
Note: all this is not doing anything useful yet.
Swift SVN r6128
2013-07-10 20:53:40 +00:00