mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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
This commit is contained in:
@@ -176,6 +176,8 @@ bool SourceKit::CodeCompletion::addCustomCompletions(
|
||||
}
|
||||
break;
|
||||
case CompletionKind::TypeDeclResultBeginning:
|
||||
case CompletionKind::TypeBeginning:
|
||||
case CompletionKind::TypeSimpleOrComposition:
|
||||
case CompletionKind::TypeSimpleBeginning:
|
||||
if (custom.Contexts.contains(CustomCompletionInfo::Type)) {
|
||||
changed = true;
|
||||
@@ -451,6 +453,8 @@ void CodeCompletionOrganizer::Impl::addCompletionsWithFilter(
|
||||
bool hideLowPriority =
|
||||
options.hideLowPriority &&
|
||||
completionKind != CompletionKind::TypeDeclResultBeginning &&
|
||||
completionKind != CompletionKind::TypeBeginning &&
|
||||
completionKind != CompletionKind::TypeSimpleOrComposition &&
|
||||
completionKind != CompletionKind::TypeSimpleBeginning &&
|
||||
completionKind != CompletionKind::PostfixExpr;
|
||||
for (Completion *completion : completions) {
|
||||
|
||||
Reference in New Issue
Block a user