Commit Graph

9 Commits

Author SHA1 Message Date
Hamish Knight
f4b928fd0a Remove FindLocalVal
Replace with an ASTScope lookup. This also lets
us simplify UsableFilteringDeclConsumer, and fixes
a couple of completion bugs.
2024-02-07 23:02:37 +00:00
Alex Hoppen
9cb2a248c6 [CodeCompletion] Add keyword completion for 'some', 'any', 'repeat', and 'each'
The implementation is not 100% perfect but I don’t think it’s worth putting too much effort into it passing more information down in the parser if 'repeat' and 'each' are valid if we are going to remove the current parser anyway.

rdar://95725895
2023-12-04 15:20:05 -08:00
Alex Hoppen
32eff21977 [IDE] Remove "Begin completions" and "End completions" from test cases
These test lines weren't actually providing any value and were annoying to write. Let's jut remove them.
2023-03-22 09:07:17 -07:00
Anthony Latsis
8c1f391878 Gardening: Migrate test suite to GH issues: IDE 2022-08-31 03:00:06 +03:00
Alex Hoppen
27bec7ae7d [CodeCompletion] Fix crasher and missing completion for generic arguments to nested type
Completing a generic parameter to a nested type `Outer.Nested<#^COMPLETE^#>` crashed when used to initialize a local variable and returned no results when initializing a global variable.

This is because the generic argument parsing logic for nested types inside `parseExprPostfixSuffix` didn’t match that of global types in `parseExprIdentifier`. Make sure they do the same thing semantically.

Fixes rdar://77909679 [SR-14627]
2021-07-22 18:37:32 +02:00
Alex Hoppen
4603b6753b [CodeComplete] Fix issue completing type in generic signature
Due to https://github.com/apple/swift/pull/36552, parsing the code completion token as a type inside a generic parameter list no longer fails. Instead, it consumes the code completion token as a type identifier. However, since `parseExprIdentifer` does not return a `ParserStatus`, the information whether a code completion token was consumed gets lost, causing `setCodeCompletionDelayedDeclState` to not be called and thus no code completion results show up.

To resolve this, make `parseExprIdentifier` return its `ParserStatus` through a `ParserResult`.

Fixes rdar://76335452 [SR-14432]
2021-04-12 18:45:00 +02:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Xi Ge
d4a19cb5d1 [test] Add missing run lines. 2016-01-08 13:02:32 -08:00
Xi Ge
f5f796b648 [CodeCompletion] Add code completion for generic parameters' inherited types. rdar://20699515 2016-01-08 12:51:58 -08:00