clang 19.0.0git
Classes | Namespaces | Macros | Enumerations | Functions
FormatToken.h File Reference

This file contains the declaration of the FormatToken, a wrapper around Token with additional information related to formatting. More...

#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/OperatorPrecedence.h"
#include "clang/Format/Format.h"
#include "clang/Lex/Lexer.h"
#include <unordered_set>
#include "clang/Basic/TransformTypeTraits.def"
#include "clang/Basic/TokenKinds.def"

Go to the source code of this file.

Classes

struct  clang::format::MacroExpansion
 Contains information on the token's role in a macro expansion. More...
 
struct  clang::format::FormatToken
 A wrapper around a Token storing information about the whitespace characters preceding it. More...
 
class  clang::format::TokenRole
 
class  clang::format::CommaSeparatedList
 
struct  clang::format::AdditionalKeywords
 Encapsulates keywords that are context sensitive or for languages not properly supported by Clang's lexer. More...
 

Namespaces

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

Macros

#define LIST_TOKEN_TYPES
 
#define TYPE(X)   TT_##X,
 
#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait)   tok::kw___##Trait,
 
#define KEYWORD(X, Y)   case tok::kw_##X:
 

Enumerations

enum  clang::format::TokenType : uint8_t { clang::format::NUM_TOKEN_TYPES }
 Determines the semantic type of a syntactic token, e.g. More...
 
enum  clang::format::BraceBlockKind { clang::format::BK_Unknown , clang::format::BK_Block , clang::format::BK_BracedInit }
 
enum  clang::format::ParameterPackingKind { clang::format::PPK_BinPacked , clang::format::PPK_OnePerLine , clang::format::PPK_Inconclusive }
 
enum  clang::format::FormatDecision { clang::format::FD_Unformatted , clang::format::FD_Continue , clang::format::FD_Break }
 
enum  clang::format::MacroRole { clang::format::MR_ExpandedArg , clang::format::MR_UnexpandedArg , clang::format::MR_Hidden }
 Roles a token can take in a configured macro expansion. More...
 

Functions

const char * clang::format::getTokenTypeName (TokenType Type)
 Determines the name of a token type.
 
bool clang::format::isLineComment (const FormatToken &FormatTok)
 
bool clang::format::continuesLineComment (const FormatToken &FormatTok, const FormatToken *Previous, const FormatToken *MinColumnToken)
 

Detailed Description

This file contains the declaration of the FormatToken, a wrapper around Token with additional information related to formatting.

Definition in file FormatToken.h.

Macro Definition Documentation

◆ KEYWORD

#define KEYWORD (   X,
 
)    case tok::kw_##X:

◆ LIST_TOKEN_TYPES

#define LIST_TOKEN_TYPES

Definition at line 27 of file FormatToken.h.

◆ TRANSFORM_TYPE_TRAIT_DEF

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

◆ TYPE

#define TYPE (   X)    TT_##X,

Definition at line 203 of file FormatToken.h.