CodeCompletionHandler.h revision f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9
1f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//===--- CodeCompletionHandler.h - Preprocessor code completion -*- C++ -*-===//
2f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//
3f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//                     The LLVM Compiler Infrastructure
4f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//
5f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor// This file is distributed under the University of Illinois Open Source
6f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor// License. See LICENSE.TXT for details.
7f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//
8f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//===----------------------------------------------------------------------===//
9f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//
10f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//  This file defines the CodeCompletionHandler interface, which provides
11f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//  code-completion callbacks for the preprocessor.
12f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//
13f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor//===----------------------------------------------------------------------===//
14f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor#ifndef LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H
15f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor#define LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H
16f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor
17f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregornamespace clang {
18f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor
19f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor/// \brief Callback handler that receives notifications when performing code
20f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor/// completion within the preprocessor.
21f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregorclass CodeCompletionHandler {
22f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregorpublic:
23f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  virtual ~CodeCompletionHandler();
24f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor
25f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// \brief Callback invoked when performing code completion for a preprocessor
26f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// directive.
27f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  ///
28f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// This callback will be invoked when the preprocessor processes a '#' at the
29f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// start of a line, followed by the code-completion token.
30f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  ///
31f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// \param InConditional Whether we're inside a preprocessor conditional
32f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// already.
33f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  virtual void CodeCompleteDirective(bool InConditional) { }
34f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor
35f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// \brief Callback invoked when performing code completion within a block of
36f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  /// code that was excluded due to preprocessor conditionals.
37f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor  virtual void CodeCompleteInConditionalExclusion() { }
38f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor};
39f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor
40f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor}
41f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor
42f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9Douglas Gregor#endif // LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H
43