Commit Graph

12 Commits

Author SHA1 Message Date
Ben Langmuir
d871c9a529 [CodeCompletion] Split code completion operator kind out
...into separate prefix, postfix and infix operators. Also incidentally
make the whitespace around operators special so we can decide when to
skip over it. Tested in SourceKit.

Swift SVN r32468
2015-10-06 22:52:16 +00:00
Ben Langmuir
9448df6fae [CodeCompletion] Add initial support for completing infix operators
This allows us to start code-completing infix operators in postfix
expressions.  As a first step, this patch only handles completing
against the immediate LHS (so for example 1 == 1 <here> doesn't suggest
boolean operators yet).

The next step is to feed the leading sequence expression from the parser
in so we can consider how the operator being completed fits into the
whole sequence expression.

For rdar://problem/22460167

Swift SVN r32465
2015-10-06 20:48:03 +00:00
Ben Langmuir
f819eb01eb [CodeCompletion] Add initial support for completing postfix operators
This allows us to start code-completing postfix operators (generally !,
++, and --), which lays some of the groundwork for completing the much
more interesting infix operators.

These only show up when in postfix position
  x<here>

For  rdar://problem/22460167

Swift SVN r32355
2015-09-30 23:48:17 +00:00
Ben Langmuir
64b1cd6fd3 [CodeCompletion] Treat top-level variables as local in top-level completion
Global variables from the same source file are more like locals when
writing top-level code, particularly in Playgrounds. Other declarations
(types, global functions, etc.) are unaffected.

rdar://problem/22329905

Swift SVN r31992
2015-09-16 16:35:27 +00:00
Xi Ge
7b6b26a46d [CodeCompletion] Only filter out non-required inits for class type.
Swift SVN r30893
2015-08-01 00:05:03 +00:00
Xi Ge
29fcee3f0b [CodeCompletion] Show only required init() as members of dynamic metatype.
rdar://22074073

Swift SVN r30888
2015-07-31 22:49:55 +00:00
Xi Ge
5a1946eb53 [CodeCompletion] Add init() to the code completion results after metatype + dot.
rdar://21474100

Swift SVN r30781
2015-07-30 00:10:43 +00:00
Ben Langmuir
5f2bcba8ba Update tests for code-completion modulename change
Add module name to OtherModule result output and update the tests
accordingly.

Swift SVN r26262
2015-03-18 16:40:28 +00:00
Denis Vnukov
152df92966 [CodeCompletion] Code Completion String getName should always return non-empty string value for
valid code completions. Code completion tests call and validate getName’s result. 

A minor fix for code completion fro subscripts.



Swift SVN r25101
2015-02-09 22:32:05 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Argyrios Kyrtzidis
df86c54874 [IDE] Rename test/CodeCompletion -> test/IDE
Swift SVN r6842
2013-08-02 17:03:21 +00:00