clang 19.0.0git
Namespaces | Macros | Functions
TokenAnnotator.cpp File Reference

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

#include "TokenAnnotator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "clang/Basic/TransformTypeTraits.def"

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::format
 

Macros

#define DEBUG_TYPE   "format-token-annotator"
 
#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait)   tok::kw___##Trait,
 

Functions

static bool clang::format::mustBreakAfterAttributes (const FormatToken &Tok, const FormatStyle &Style)
 
static unsigned clang::format::maxNestingDepth (const AnnotatedLine &Line)
 
static FormatToken * clang::format::getFunctionName (const AnnotatedLine &Line)
 
static bool clang::format::isCtorOrDtorName (const FormatToken *Tok)
 
static bool clang::format::isFunctionDeclarationName (const FormatToken &Current, const AnnotatedLine &Line, FormatToken *&ClosingParen)
 
static bool clang::format::isAllmanBrace (const FormatToken &Tok)
 
static bool clang::format::IsFunctionArgument (const FormatToken &Tok)
 
static bool clang::format::isItAnEmptyLambdaAllowed (const FormatToken &Tok, FormatStyle::ShortLambdaStyle ShortLambdaOption)
 
static bool clang::format::isAllmanLambdaBrace (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

◆ DEBUG_TYPE

#define DEBUG_TYPE   "format-token-annotator"

Definition at line 18 of file TokenAnnotator.cpp.

◆ TRANSFORM_TYPE_TRAIT_DEF

#define TRANSFORM_TYPE_TRAIT_DEF (   _,
  Trait 
)    tok::kw___##Trait,

Variable Documentation

◆ BindingStrength

unsigned BindingStrength

Definition at line 2034 of file TokenAnnotator.cpp.

◆ CanBeExpression

bool CanBeExpression = true

Definition at line 2042 of file TokenAnnotator.cpp.

◆ CaretFound

bool CaretFound = false

Definition at line 2043 of file TokenAnnotator.cpp.

◆ ColonIsDictLiteral

bool ColonIsDictLiteral = false

Definition at line 2038 of file TokenAnnotator.cpp.

◆ ColonIsForRangeExpr

bool ColonIsForRangeExpr = false

Definition at line 2037 of file TokenAnnotator.cpp.

◆ ColonIsObjCMethodExpr

bool ColonIsObjCMethodExpr = false

Definition at line 2039 of file TokenAnnotator.cpp.

◆ ContextKind

tok::TokenKind ContextKind

Definition at line 2033 of file TokenAnnotator.cpp.

◆ 

enum { ... } ContextType

◆ FirstObjCSelectorName

FormatToken* FirstObjCSelectorName = nullptr

Definition at line 2040 of file TokenAnnotator.cpp.

◆ FirstStartOfName

FormatToken* FirstStartOfName = nullptr

Definition at line 2041 of file TokenAnnotator.cpp.

◆ InCpp11AttributeSpecifier

bool InCpp11AttributeSpecifier = false

Definition at line 2044 of file TokenAnnotator.cpp.

◆ InCSharpAttributeSpecifier

bool InCSharpAttributeSpecifier = false

Definition at line 2045 of file TokenAnnotator.cpp.

◆ IsExpression

bool IsExpression

Definition at line 2035 of file TokenAnnotator.cpp.

◆ IsTableGenBangOpe

bool IsTableGenBangOpe = false

Definition at line 2051 of file TokenAnnotator.cpp.

◆ IsTableGenCondOpe

bool IsTableGenCondOpe = false

Definition at line 2052 of file TokenAnnotator.cpp.

◆ IsTableGenDAGArg

bool IsTableGenDAGArg = false

Definition at line 2050 of file TokenAnnotator.cpp.

◆ LongestObjCSelectorName

unsigned LongestObjCSelectorName = 0

Definition at line 2036 of file TokenAnnotator.cpp.

◆ P

AnnotatingParser& P

Definition at line 2078 of file TokenAnnotator.cpp.

◆ VerilogAssignmentFound

bool VerilogAssignmentFound = false

Definition at line 2046 of file TokenAnnotator.cpp.

◆ VerilogMayBeConcatenation

bool VerilogMayBeConcatenation = false

Definition at line 2049 of file TokenAnnotator.cpp.