mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This will allow us to run two different completion kinds and deliver results from both of them. Also: Compute a unified type context for global lookup. Previously, we always used the expected type context of the last lookup. But really, we should be considering all possible types from all constraint system solutions when computing code completion results from the cache.
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
//===--- CodeCompletionConsumer.h -----------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2022 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_IDE_CODECOMPLETIONCONSUMER
|
|
#define SWIFT_IDE_CODECOMPLETIONCONSUMER
|
|
|
|
#include "swift/IDE/CodeCompletionContext.h"
|
|
#include "swift/Parse/IDEInspectionCallbacks.h"
|
|
|
|
namespace swift {
|
|
namespace ide {
|
|
|
|
struct RequestedCachedModule;
|
|
|
|
/// An abstract base class for consumers of code completion results.
|
|
class CodeCompletionConsumer {
|
|
public:
|
|
virtual ~CodeCompletionConsumer() {}
|
|
/// Clients should override this method to receive \p Results.
|
|
virtual void handleResults(CodeCompletionContext &context) = 0;
|
|
};
|
|
|
|
} // end namespace ide
|
|
} // end namespace swift
|
|
|
|
#endif // SWIFT_IDE_CODECOMPLETIONCONSUMER
|