clang  3.9.0
Namespaces | Macros | Functions
TokenAnnotator.cpp File Reference

This file implements a token annotator, i.e. More...

#include "TokenAnnotator.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/Debug.h"
Include dependency graph for TokenAnnotator.cpp:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::format
 

Macros

#define DEBUG_TYPE   "format-token-annotator"
 

Functions

static bool clang::format::isFunctionDeclarationName (const FormatToken &Current, const AnnotatedLine &Line)
 
static bool clang::format::isAllmanBrace (const FormatToken &Tok)
 

Detailed Description

This file implements a token annotator, i.e.

creates AnnotatedTokens out of FormatTokens with required extra information.

Definition in file TokenAnnotator.cpp.

Macro Definition Documentation

#define DEBUG_TYPE   "format-token-annotator"

Definition at line 21 of file TokenAnnotator.cpp.

Variable Documentation

bool AutoFound

Definition at line 1339 of file TokenAnnotator.cpp.

unsigned BindingStrength

Definition at line 890 of file TokenAnnotator.cpp.

bool CanBeExpression = true

Definition at line 898 of file TokenAnnotator.cpp.

bool CaretFound = false

Definition at line 901 of file TokenAnnotator.cpp.

bool ColonIsDictLiteral = false

Definition at line 894 of file TokenAnnotator.cpp.

bool ColonIsForRangeExpr = false

Definition at line 893 of file TokenAnnotator.cpp.

bool ColonIsObjCMethodExpr = false

Definition at line 895 of file TokenAnnotator.cpp.

tok::TokenKind ContextKind
SmallVector<Context, 8> Contexts
FormatToken* Current
FormatToken* CurrentToken

Definition at line 1338 of file TokenAnnotator.cpp.

FormatToken* FirstObjCSelectorName = nullptr

Definition at line 896 of file TokenAnnotator.cpp.

FormatToken* FirstStartOfName = nullptr

Definition at line 897 of file TokenAnnotator.cpp.

bool InCtorInitializer = false

Definition at line 900 of file TokenAnnotator.cpp.

bool InTemplateArgument = false

Definition at line 899 of file TokenAnnotator.cpp.

bool IsExpression

Definition at line 891 of file TokenAnnotator.cpp.

bool IsForEachMacro = false

Definition at line 902 of file TokenAnnotator.cpp.

const AdditionalKeywords& Keywords

Definition at line 1340 of file TokenAnnotator.cpp.

Referenced by clang::format::JavaScriptImportSorter::analyze().

AnnotatedLine& Line
unsigned LongestObjCSelectorName = 0

Definition at line 892 of file TokenAnnotator.cpp.

llvm::SmallPtrSet<FormatToken *, 16> NonTemplateLess

Definition at line 1346 of file TokenAnnotator.cpp.

AnnotatingParser& P

Definition at line 908 of file TokenAnnotator.cpp.

const FormatStyle& Style

Definition at line 1336 of file TokenAnnotator.cpp.