A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/FormatToken_8h_source.html below:

clang: lib/Format/FormatToken.h Source File

15#ifndef LLVM_CLANG_LIB_FORMAT_FORMATTOKEN_H 16#define LLVM_CLANG_LIB_FORMAT_FORMATTOKEN_H 22#include <unordered_set> 27#define LIST_TOKEN_TYPES \ 28 TYPE(AfterPPDirective) \ 29 TYPE(ArrayInitializerLSquare) \ 30 TYPE(ArraySubscriptLSquare) \ 31 TYPE(AttributeColon) \ 32 TYPE(AttributeLParen) \ 33 TYPE(AttributeMacro) \ 34 TYPE(AttributeRParen) \ 35 TYPE(AttributeSquare) \ 36 TYPE(BinaryOperator) \ 41 TYPE(BracedListLBrace) \ 42 TYPE(CaseLabelArrow) \ 44 TYPE(CaseLabelColon) \ 50 TYPE(CompoundRequirementLBrace) \ 52 TYPE(ConditionalExpr) \ 54 TYPE(ConditionLParen) \ 55 TYPE(ConflictAlternative) \ 59 TYPE(ControlStatementLBrace) \ 60 TYPE(ControlStatementRBrace) \ 62 TYPE(CSharpGenericTypeConstraint) \ 63 TYPE(CSharpGenericTypeConstraintColon) \ 64 TYPE(CSharpGenericTypeConstraintComma) \ 65 TYPE(CSharpNamedArgumentColon) \ 66 TYPE(CSharpNullable) \ 67 TYPE(CSharpNullConditionalLSquare) \ 68 TYPE(CSharpStringLiteral) \ 69 TYPE(CtorInitializerColon) \ 70 TYPE(CtorInitializerComma) \ 71 TYPE(CtorDtorDeclName) \ 72 TYPE(DesignatedInitializerLSquare) \ 73 TYPE(DesignatedInitializerPeriod) \ 82 TYPE(FunctionAnnotationRParen) \ 83 TYPE(FunctionDeclarationName) \ 84 TYPE(FunctionDeclarationLParen) \ 85 TYPE(FunctionLBrace) \ 86 TYPE(FunctionLikeOrFreestandingMacro) \ 87 TYPE(FunctionTypeLParen) \ 89 TYPE(GenericSelectionColon) \ 91 TYPE(GotoLabelColon) \ 93 TYPE(ImplicitStringLiteral) \ 94 TYPE(InheritanceColon) \ 95 TYPE(InheritanceComma) \ 96 TYPE(InlineASMBrace) \ 97 TYPE(InlineASMColon) \ 98 TYPE(InlineASMSymbolicNameLSquare) \ 99 TYPE(JavaAnnotation) \ 100 TYPE(JsAndAndEqual) \ 101 TYPE(JsComputedPropertyName) \ 102 TYPE(JsExponentiation) \ 103 TYPE(JsExponentiationEqual) \ 104 TYPE(JsPipePipeEqual) \ 105 TYPE(JsPrivateIdentifier) \ 107 TYPE(JsTypeOperator) \ 108 TYPE(JsTypeOptionalQuestion) \ 110 TYPE(LambdaDefinitionLParen) \ 112 TYPE(LambdaLSquare) \ 113 TYPE(LeadingJavaAnnotation) \ 115 TYPE(MacroBlockBegin) \ 116 TYPE(MacroBlockEnd) \ 117 TYPE(ModulePartitionColon) \ 118 TYPE(NamespaceLBrace) \ 119 TYPE(NamespaceMacro) \ 120 TYPE(NamespaceRBrace) \ 121 TYPE(NonNullAssertion) \ 122 TYPE(NullCoalescingEqual) \ 123 TYPE(NullCoalescingOperator) \ 124 TYPE(NullPropagatingOperator) \ 125 TYPE(ObjCBlockLBrace) \ 126 TYPE(ObjCBlockLParen) \ 129 TYPE(ObjCMethodExpr) \ 130 TYPE(ObjCMethodSpecifier) \ 132 TYPE(ObjCStringLiteral) \ 133 TYPE(OverloadedOperator) \ 134 TYPE(OverloadedOperatorLParen) \ 135 TYPE(PointerOrReference) \ 136 TYPE(ProtoExtensionLSquare) \ 137 TYPE(PureVirtualSpecifier) \ 138 TYPE(RangeBasedForLoopColon) \ 142 TYPE(RequiresClause) \ 143 TYPE(RequiresClauseInARequiresExpression) \ 144 TYPE(RequiresExpression) \ 145 TYPE(RequiresExpressionLBrace) \ 146 TYPE(RequiresExpressionLParen) \ 149 TYPE(StatementAttributeLikeMacro) \ 150 TYPE(StatementMacro) \ 155 TYPE(StringInConcatenation) \ 158 TYPE(StructuredBindingLSquare) \ 159 TYPE(SwitchExpressionLabel) \ 160 TYPE(SwitchExpressionLBrace) \ 161 TYPE(TableGenBangOperator) \ 162 TYPE(TableGenCondOperator) \ 163 TYPE(TableGenCondOperatorColon) \ 164 TYPE(TableGenCondOperatorComma) \ 165 TYPE(TableGenDAGArgCloser) \ 166 TYPE(TableGenDAGArgListColon) \ 167 TYPE(TableGenDAGArgListColonToAlign) \ 168 TYPE(TableGenDAGArgListComma) \ 169 TYPE(TableGenDAGArgListCommaToBreak) \ 170 TYPE(TableGenDAGArgOpener) \ 171 TYPE(TableGenDAGArgOpenerToBreak) \ 172 TYPE(TableGenDAGArgOperatorID) \ 173 TYPE(TableGenDAGArgOperatorToBreak) \ 174 TYPE(TableGenListCloser) \ 175 TYPE(TableGenListOpener) \ 176 TYPE(TableGenMultiLineString) \ 177 TYPE(TableGenTrailingPasteOperator) \ 178 TYPE(TableGenValueSuffix) \ 179 TYPE(TemplateCloser) \ 180 TYPE(TemplateOpener) \ 181 TYPE(TemplateString) \ 182 TYPE(TrailingAnnotation) \ 183 TYPE(TrailingReturnArrow) \ 184 TYPE(TrailingUnaryOperator) \ 185 TYPE(TypeDeclarationParen) \ 188 TYPE(TypenameMacro) \ 189 TYPE(UnaryOperator) \ 192 TYPE(UntouchableMacroFunc) \ 193 TYPE(VariableTemplate) \ 195 TYPE(VerilogAssignComma) \ 197 TYPE(VerilogBlockLabelColon) \ 201 TYPE(VerilogDimensionedTypeName) \ 203 TYPE(VerilogInstancePortComma) \ 204 TYPE(VerilogInstancePortLParen) \ 207 TYPE(VerilogMultiLineListLParen) \ 209 TYPE(VerilogNumberBase) \ 211 TYPE(VerilogStrength) \ 213 TYPE(VerilogTableItem) \ 215 TYPE(VerilogTypeComma) \ 221#define TYPE(X) TT_##X, 331

std::shared_ptr<TokenRole>

Role

;

394 unsigned

BlockKind : 2;

402

assert(

getBlockKind

() == BBK &&

"BraceBlockKind overflow!"

);

407 unsigned

Decision : 2;

415

assert(

getDecision

() ==

D

&&

"FormatDecision overflow!"

);

420 unsigned

PackingKind : 2;

428

assert(

getPackingKind

() == K &&

"ParameterPackingKind overflow!"

);

432 unsigned

TypeIsFinalized : 1;

445

assert((!TypeIsFinalized ||

T

==

Type

) &&

446 "Please use overwriteFixedType to change a fixed type."

);

457

TypeIsFinalized =

true

;

462

TypeIsFinalized =

false

;

609

std::optional<MacroExpansion>

MacroCtx

;

632 template

<

typename

A,

typename

B>

bool isOneOf

(A K1, B K2)

const

{

635 template

<

typename

A,

typename

B,

typename

... Ts>

636 bool isOneOf

(A K1, B K2, Ts... Ks)

const

{

639 template

<

typename

T>

bool isNot

(

T Kind

)

const

{

return

!

is

(

Kind

); }

641 bool isIf

(

bool

AllowConstexprMacro =

true

)

const

{

642 return is

(tok::kw_if) ||

endsSequence

(tok::kw_constexpr, tok::kw_if) ||

643

(

endsSequence

(tok::identifier, tok::kw_if) && AllowConstexprMacro);

656 template

<

typename

A,

typename

... Ts>

658 return

startsSequenceInternal(K1, Tokens...);

667 template

<

typename

A,

typename

... Ts>

669 return

endsSequenceInternal(K1, Tokens...);

675 return isOneOf

(tok::kw___attribute, tok::kw___declspec, TT_AttributeMacro);

683 return isOneOf

(tok::kw_public, tok::kw_protected, tok::kw_private);

692 return

NextNonComment && NextNonComment->is(tok::colon);

696 return isOneOf

(tok::kw_const, tok::kw_restrict, tok::kw_volatile,

697

tok::kw__Nonnull, tok::kw__Nullable,

698

tok::kw__Null_unspecified, tok::kw___ptr32, tok::kw___ptr64,

699

tok::kw___funcref) ||

707 return is

(tok::at) &&

Next

&&

717 if

(

is

(TT_TemplateString) &&

TokenText

.ends_with(

"${"

))

719 if

(

is

(TT_DictLiteral) &&

is

(tok::less))

721 return isOneOf

(tok::l_paren, tok::l_brace, tok::l_square,

727 if

(

is

(TT_TemplateString) &&

TokenText

.starts_with(

"}"

))

729 if

(

is

(TT_DictLiteral) &&

is

(tok::greater))

731 return isOneOf

(tok::r_paren, tok::r_brace, tok::r_square,

737 return isOneOf

(tok::arrow, tok::period, tok::arrowstar) &&

738

!

isOneOf

(TT_DesignatedInitializerPeriod, TT_TrailingReturnArrow,

739

TT_LambdaArrow, TT_LeadingJavaAnnotation);

743 return isOneOf

(tok::star, tok::amp, tok::ampamp);

758 case

tok::exclaimequal:

762 case

tok::caretequal:

774 case

tok::minusminus:

778 case

tok::kw_alignof:

791 return is

(tok::comment) &&

801 return isOneOf

(tok::kw_throw, tok::kw_typeid, tok::kw_return,

802

tok::kw_sizeof, tok::kw_alignof, tok::kw_alignas,

803

tok::kw_decltype, tok::kw_noexcept, tok::kw_static_assert,

806

#include

"clang/Basic/TransformTypeTraits.def" 813 if

(

isNot

(tok::string_literal))

816 if

(Content.starts_with(

"\""

) || Content.starts_with(

"'"

))

817

Content = Content.drop_front(1);

818 if

(Content.ends_with(

"\""

) || Content.ends_with(

"'"

))

819

Content = Content.drop_back(1);

820

Content = Content.trim();

821 return

Content.size() > 1 &&

822

(Content.back() ==

':'

|| Content.back() ==

'='

);

858 while

(

Tok

&&

Tok

->

is

(tok::comment))

873 if

(!IsCpp ||

isNot

(tok::l_square))

877 T

=

T

->getPreviousNonComment();

878

}

while

(

T

&&

T

->isOneOf(tok::kw_const, tok::kw_volatile, tok::amp,

880 return T

&&

T

->is(tok::kw_auto);

894 if

(

is

(tok::comment))

897 if

(NamespaceTok && NamespaceTok->

isOneOf

(tok::kw_inline, tok::kw_export))

899 return

NamespaceTok &&

900

NamespaceTok->

isOneOf

(tok::kw_namespace, TT_NamespaceMacro)

912 template

<

typename

A,

typename

... Ts>

913 bool

startsSequenceInternal(A K1, Ts... Tokens)

const

{

914 if

(

is

(tok::comment) &&

Next

)

915 return Next

->startsSequenceInternal(K1, Tokens...);

916 return is

(K1) &&

Next

&&

Next

->startsSequenceInternal(Tokens...);

919 template

<

typename

A>

bool

startsSequenceInternal(A K1)

const

{

920 if

(

is

(tok::comment) &&

Next

)

921 return Next

->startsSequenceInternal(K1);

925 template

<

typename

A,

typename

... Ts>

bool

endsSequenceInternal(A K1)

const

{

927 return Previous

->endsSequenceInternal(K1);

931 template

<

typename

A,

typename

... Ts>

932 bool

endsSequenceInternal(A K1, Ts... Tokens)

const

{

934 return Previous

->endsSequenceInternal(K1, Tokens...);

988 bool

DryRun)

override

;

991 bool

DryRun)

override

;

995

Commas.push_back(

Token

);

1001 return

Commas.back();

1007 struct

ColumnFormat {

1012 unsigned

TotalWidth;

1023 const

ColumnFormat *getColumnFormat(

unsigned

RemainingCharacters)

const

;

1026

SmallVector<const FormatToken *, 8> Commas;

1030

SmallVector<unsigned, 8> ItemLengths;

1033

SmallVector<ColumnFormat, 4> Formats;

1035 bool

HasNestedBracedList;

1105

&IdentTable.

get

(

"__CLANG_FORMAT_INTERNAL_IDENT_AFTER_DEFINE__"

);

1293

JsExtraKeywords = std::unordered_set<IdentifierInfo *>(

1300

CSharpExtraKeywords = std::unordered_set<IdentifierInfo *>(

1317

VerilogExtraKeywords = std::unordered_set<IdentifierInfo *>(

1383

TableGenExtraKeywords = std::unordered_set<IdentifierInfo *>({

1676 bool

AcceptIdentifierName =

true

)

const

{

1686 case

tok::kw_continue:

1688 case

tok::kw_default:

1689 case

tok::kw_delete:

1693 case

tok::kw_export:

1697 case

tok::kw_import:

1698 case

tok::kw_module:

1700 case

tok::kw_return:

1701 case

tok::kw_static:

1702 case

tok::kw_switch:

1707 case

tok::kw_typeof:

1712 case

tok::identifier: {

1715 bool

IsPseudoKeyword =

1717

JsExtraKeywords.end();

1718 return

AcceptIdentifierName || !IsPseudoKeyword;

1728#define KEYWORD(X, Y) case tok::kw_##X: 1729#include "clang/Basic/TokenKinds.def" 1742 if

(Tok.isAccessSpecifierKeyword())

1744 switch

(Tok.Tok.getKind()) {

1752 case

tok::kw_continue:

1753 case

tok::kw_default:

1755 case

tok::kw_double:

1758 case

tok::kw_explicit:

1759 case

tok::kw_extern:

1767 case

tok::kw_namespace:

1769 case

tok::kw_operator:

1770 case

tok::kw_return:

1772 case

tok::kw_sizeof:

1773 case

tok::kw_static:

1774 case

tok::kw_struct:

1775 case

tok::kw_switch:

1780 case

tok::kw_typeof:

1782 case

tok::kw_virtual:

1784 case

tok::kw_volatile:

1788 return

Tok.is(tok::identifier) &&

1789

CSharpExtraKeywords.find(Tok.Tok.getIdentifierInfo()) ==

1790

CSharpExtraKeywords.end();

1808 case

tok::kw_continue:

1809 case

tok::kw_default:

1811 case

tok::kw_extern:

1816 case

tok::kw_restrict:

1817 case

tok::kw_signed:

1818 case

tok::kw_static:

1819 case

tok::kw_struct:

1820 case

tok::kw_typedef:

1822 case

tok::kw_unsigned:

1823 case

tok::kw_virtual:

1826 case

tok::identifier:

1829

VerilogExtraKeywords.end();

1840 auto

Info = Tok.Tok.getIdentifierInfo();

1843 switch

(Info->getPPKeywordID()) {

1844 case

tok::pp_define:

1848 case

tok::pp_ifndef:

1849 case

tok::pp_include:

1851 case

tok::pp_pragma:

1903 return

Tok.

is

(TT_CaseLabelColon) ||

1904

(Tok.

is

(tok::kw_default) &&

1918 case

tok::kw_extern:

1919 case

tok::kw_signed:

1920 case

tok::kw_static:

1921 case

tok::kw_unsigned:

1922 case

tok::kw_virtual:

1924 case

tok::identifier:

1952 return

Tok.

is

(tok::identifier) &&

1954

TableGenExtraKeywords.end();

1960

std::unordered_set<IdentifierInfo *> JsExtraKeywords;

1963

std::unordered_set<IdentifierInfo *> CSharpExtraKeywords;

1966

std::unordered_set<IdentifierInfo *> VerilogExtraKeywords;

1969

std::unordered_set<IdentifierInfo *> TableGenExtraKeywords;

1973 return

FormatTok.is(tok::comment) && !FormatTok.TokenText.starts_with(

"/*"

);

1981 const

FormatToken *MinColumnToken) {

1984 unsigned

MinContinueColumn =

1985

MinColumnToken->OriginalColumn + (

isLineComment

(*MinColumnToken) ? 0 : 1);

1986 return isLineComment

(FormatTok) && FormatTok.NewlinesBefore == 1 &&

1988

FormatTok.OriginalColumn >= MinContinueColumn;

enum clang::sema::@1704::IndirectLocalPathEntry::EntryKind Kind

Various functions to configurably format source code.

Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.

Defines and computes precedence levels for binary/ternary operators.

static constexpr bool isOneOf()

#define TRANSFORM_TYPE_TRAIT_DEF(Enum, _)

ContinuationIndenter * Indenter

One of these records is kept for each identifier that is lexed.

tok::PPKeywordKind getPPKeywordID() const

Return the preprocessor keyword ID for this identifier.

Implements an efficient mapping from strings to IdentifierInfo nodes.

IdentifierInfo & get(StringRef Name)

Return the identifier token info for the specified named identifier.

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...

Encodes a location in the source.

A trivial tuple used to represent a source range.

SourceLocation getEnd() const

SourceLocation getBegin() const

Token - This structure provides full information about a lexed token.

IdentifierInfo * getIdentifierInfo() const

bool is(tok::TokenKind K) const

is/isNot - Predicates to check if this token is a specific kind, as in "if (Tok.is(tok::l_brace)) {....

tok::TokenKind getKind() const

bool isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const

Return true if we have an ObjC keyword identifier.

The base class of the type hierarchy.

unsigned formatFromToken(LineState &State, ContinuationIndenter *Indenter, bool DryRun) override

Apply the special formatting that the given role demands.

void CommaFound(const FormatToken *Token) override

Adds Token as the next comma to the CommaSeparated list.

const FormatToken * lastComma() override

unsigned formatAfterToken(LineState &State, ContinuationIndenter *Indenter, bool DryRun) override

Same as formatFromToken, but assumes that the first token has already been set thereby deciding on th...

void precomputeFormattingInfos(const FormatToken *Token) override

After the TokenAnnotator has finished annotating all the tokens, this function precomputes required i...

virtual unsigned formatAfterToken(LineState &State, ContinuationIndenter *Indenter, bool DryRun)

Same as formatFromToken, but assumes that the first token has already been set thereby deciding on th...

virtual void precomputeFormattingInfos(const FormatToken *Token)

After the TokenAnnotator has finished annotating all the tokens, this function precomputes required i...

const FormatStyle & Style

virtual void CommaFound(const FormatToken *Token)

Notifies the Role that a comma was found.

virtual const FormatToken * lastComma()

virtual unsigned formatFromToken(LineState &State, ContinuationIndenter *Indenter, bool DryRun)

Apply the special formatting that the given role demands.

const char * getTokenTypeName(TokenType Type)

Determines the name of a token type.

MacroRole

Roles a token can take in a configured macro expansion.

@ MR_UnexpandedArg

The token is part of a macro argument that was previously formatted as expansion when formatting the ...

@ MR_Hidden

The token was expanded from a macro definition, and is not visible as part of the macro call.

@ MR_ExpandedArg

The token was expanded from a macro argument when formatting the expanded token sequence.

bool continuesLineComment(const FormatToken &FormatTok, const FormatToken *Previous, const FormatToken *MinColumnToken)

bool isLineComment(const FormatToken &FormatTok)

TokenType

Determines the semantic type of a syntactic token, e.g.

bool startsNextParameter(const FormatToken &Current, const FormatStyle &Style)

bool isStringLiteral(TokenKind K)

Return true if this is a C or C++ string-literal (or C++11 user-defined-string-literal) token.

ObjCKeywordKind

Provides a namespace for Objective-C keywords which start with an '@'.

TokenKind

Provides a simple uniform namespace for tokens from all C languages.

PPKeywordKind

Provides a namespace for preprocessor keywords which start with a '#' at the beginning of the line.

The JSON file list parser is used to communicate input to InstallAPI.

prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator, bool CPlusPlus11)

Return the precedence of the specified binary operator token.

const FunctionProtoType * T

Encapsulates keywords that are context sensitive or for languages not properly supported by Clang's l...

IdentifierInfo * kw_endchecker

IdentifierInfo * kw_endcelldefine

IdentifierInfo * kw_endtable

IdentifierInfo * kw_decimal

IdentifierInfo * kw_module

IdentifierInfo * kw_randc

bool isVerilogEnd(const FormatToken &Tok) const

Returns whether Tok is a Verilog keyword that closes a block.

IdentifierInfo * kw_undefineall

IdentifierInfo * kw_verilogHashHash

IdentifierInfo * kw_foreach

IdentifierInfo * kw_forever

IdentifierInfo * kw_nounconnected_drive

IdentifierInfo * kw_celldefine

IdentifierInfo * kw_delay_mode_unit

IdentifierInfo * kw_signals

IdentifierInfo * kw_strong0

IdentifierInfo * kw_unsafe

IdentifierInfo * kw_inside

IdentifierInfo * kw_CF_ENUM

IdentifierInfo * kw_ifnone

IdentifierInfo * kw_checked

IdentifierInfo * kw_extend

IdentifierInfo * kw_endmodule

IdentifierInfo * kw_inout

IdentifierInfo * kw_synchronized

IdentifierInfo * kw_sample

IdentifierInfo * kw_object

IdentifierInfo * kw_specparam

IdentifierInfo * kw_randcase

IdentifierInfo * kw_endcase

bool isWordLike(const FormatToken &Tok, bool IsVerilog=true) const

Returns true if Tok is a keyword or an identifier.

IdentifierInfo * kw_native

IdentifierInfo * kw_randsequence

IdentifierInfo * kw_always_ff

IdentifierInfo * kw_always_latch

IdentifierInfo * kw_end_keywords

IdentifierInfo * kw_typeof

IdentifierInfo * kw_endproperty

IdentifierInfo * kw_final

IdentifierInfo * kw_interconnect

IdentifierInfo * kw_trireg

IdentifierInfo * kw_apostrophe

IdentifierInfo * kw_join_any

IdentifierInfo * kw_endgenerate

IdentifierInfo * kw_option

IdentifierInfo * kw_assert

IdentifierInfo * kw_weak0

IdentifierInfo * kw_intersect

IdentifierInfo * kw_uwire

IdentifierInfo * kw_string

bool isVerilogBegin(const FormatToken &Tok) const

Returns whether Tok is a Verilog keyword that opens a block.

IdentifierInfo * kw_before

IdentifierInfo * kw_constraint

bool isJavaScriptIdentifier(const FormatToken &Tok, bool AcceptIdentifierName=true) const

Returns true if Tok is a true JavaScript identifier, returns false if it is a keyword or a pseudo key...

IdentifierInfo * kw_initial

bool isVerilogQualifier(const FormatToken &Tok) const

IdentifierInfo * kw_priority

IdentifierInfo * kw_weak1

IdentifierInfo * kw_supply1

IdentifierInfo * kw_input

IdentifierInfo * kw_medium

IdentifierInfo * kw_qsignals

IdentifierInfo * kw_illegal_bins

IdentifierInfo * kw_cover

IdentifierInfo * kw_assume

IdentifierInfo * kw_default_trireg_strength

bool isVerilogStructuredProcedure(const FormatToken &Tok) const

Returns whether Tok is a Verilog keyword that starts a structured procedure like 'always'.

IdentifierInfo * kw_negedge

IdentifierInfo * kw_endtask

IdentifierInfo * kw_CF_OPTIONS

bool isVerilogEndOfLabel(const FormatToken &Tok) const

IdentifierInfo * kw_defset

IdentifierInfo * kw_unique0

IdentifierInfo * kw_vectored

IdentifierInfo * kw_readonly

IdentifierInfo * kw_interface

IdentifierInfo * kw_include

IdentifierInfo * kw_delay_mode_path

IdentifierInfo * kw_declare

bool isVerilogWordOperator(const FormatToken &Tok) const

IdentifierInfo * kw_NS_ERROR_ENUM

IdentifierInfo * kw_sbyte

IdentifierInfo * kw_yield

IdentifierInfo * kw_checker

IdentifierInfo * kw_delay_mode_distributed

IdentifierInfo * kw_ignore_bins

IdentifierInfo * kw_CF_CLOSED_ENUM

IdentifierInfo * kw_program

IdentifierInfo * kw_endfunction

IdentifierInfo * kw_posedge

IdentifierInfo * kw_implicit

IdentifierInfo * kw_assign

IdentifierInfo * kw_optional

IdentifierInfo * kw_delay_mode_zero

IdentifierInfo * kw_delegate

IdentifierInfo * kw_slots

IdentifierInfo * kw_import

IdentifierInfo * kw_multiclass

IdentifierInfo * kw_large

IdentifierInfo * kw_trior

IdentifierInfo * kw_casex

IdentifierInfo * kw_dollar

bool isTableGenKeyword(const FormatToken &Tok) const

IdentifierInfo * kw_repeat

IdentifierInfo * kw_highz0

IdentifierInfo * kw_ushort

bool isVerilogKeywordSymbol(const FormatToken &Tok) const

IdentifierInfo * kw_where

IdentifierInfo * kw_pull1

IdentifierInfo * kw_automatic

IdentifierInfo * kw_ulong

IdentifierInfo * kw_default_decay_time

IdentifierInfo * kw_small

IdentifierInfo * kw_stackalloc

IdentifierInfo * kw_finally

IdentifierInfo * kw_event

IdentifierInfo * kw_timescale

IdentifierInfo * kw_coverpoint

IdentifierInfo * kw_scalared

IdentifierInfo * kw_strong1

IdentifierInfo * kw_NS_CLOSED_ENUM

IdentifierInfo * kw_supply0

IdentifierInfo * kw_endpackage

IdentifierInfo * kw_triand

IdentifierInfo * kw_join_none

IdentifierInfo * kw_returns

IdentifierInfo * kw_local

IdentifierInfo * kw_resetall

IdentifierInfo * kw_solve

bool isCSharpKeyword(const FormatToken &Tok) const

Returns true if Tok is a C# keyword, returns false if it is a anything else.

IdentifierInfo * kw_region

IdentifierInfo * kw_disable

IdentifierInfo * kw___has_include_next

IdentifierInfo * kw___has_include

bool isVerilogHierarchy(const FormatToken &Tok) const

Returns whether Tok is a Verilog keyword that opens a module, etc.

IdentifierInfo * kw_repeated

IdentifierInfo * kw_binsof

IdentifierInfo * kw_endclass

IdentifierInfo * kw_package

IdentifierInfo * kw_async

IdentifierInfo * kw_pull0

IdentifierInfo * kw_wildcard

IdentifierInfo * kw_required

IdentifierInfo * kw_always_comb

IdentifierInfo * kw_internal

IdentifierInfo * kw_sequence

bool isVerilogPPDirective(const FormatToken &Tok) const

Returns whether Tok is a Verilog preprocessor directive.

IdentifierInfo * kw_primitive

IdentifierInfo * kw_casez

IdentifierInfo * kw_localparam

IdentifierInfo * kw_endinterface

IdentifierInfo * kw_infer

IdentifierInfo * kw_unconnected_drive

IdentifierInfo * kw_throws

IdentifierInfo * kw_begin

IdentifierInfo * kw_NS_ENUM

IdentifierInfo * kw_override

IdentifierInfo * kw___except

IdentifierInfo * kw_endprimitive

IdentifierInfo * kw_endgroup

IdentifierInfo * kw_elsif

IdentifierInfo * kw_table

IdentifierInfo * kw_params

IdentifierInfo * kw_endprogram

IdentifierInfo * kw_parameter

IdentifierInfo * kw_NS_OPTIONS

IdentifierInfo * kw_abstract

IdentifierInfo * kw_fixed

IdentifierInfo * kw_internal_ident_after_define

bool isTableGenDefinition(const FormatToken &Tok) const

IdentifierInfo * kw_await

IdentifierInfo * kw_packed

IdentifierInfo * kw_defvar

IdentifierInfo * kw_implements

IdentifierInfo * kw_always

IdentifierInfo * kw_specify

IdentifierInfo * kw_endclocking

IdentifierInfo * kw_verilogHash

IdentifierInfo * kw_generate

IdentifierInfo * kw_macromodule

IdentifierInfo * kw_covergroup

IdentifierInfo * kw_instanceof

IdentifierInfo * kw_matches

IdentifierInfo * kw_qslots

IdentifierInfo * kw_function

IdentifierInfo * kw_unchecked

bool isVerilogIdentifier(const FormatToken &Tok) const

IdentifierInfo * kw_clocking

IdentifierInfo * kw_unique

IdentifierInfo * kw_endspecify

IdentifierInfo * kw_highz1

IdentifierInfo * kw_extends

IdentifierInfo * kw_begin_keywords

IdentifierInfo * kw_tagged

IdentifierInfo * kw_property

IdentifierInfo * kw_default_nettype

IdentifierInfo * kw_output

IdentifierInfo * kw_endsequence

IdentifierInfo * kw_sealed

The FormatStyle is used to configure the formatting to follow specific guidelines.

A wrapper around a Token storing information about the whitespace characters preceding it.

unsigned NestingLevel

The nesting level of this token, i.e.

unsigned MustBreakBeforeFinalized

Whether MustBreakBefore is finalized during parsing and must not be reset between runs.

bool isMemberAccess() const

Returns true if this is a "." or "->" accessing a member.

unsigned FakeRParens

Insert this many fake ) after this token for correct indentation.

bool ArrayInitializerLineStart

This notes the start of the line of an array initializer.

bool isTypeFinalized() const

bool Optional

Is optional and can be removed.

bool MacroParent

When macro expansion introduces nodes with children, those are marked as MacroParent.

int Newlines

The number of newlines immediately before the Token after formatting.

SmallVector< AnnotatedLine *, 1 > Children

If this token starts a block, this contains all the unwrapped lines in it.

bool closesScopeAfterBlock() const

bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const

prec::Level ForcedPrecedence

Used to set an operator precedence explicitly.

bool closesBlockOrBlockTypeList(const FormatStyle &Style) const

Same as opensBlockOrBlockTypeList, but for the closing token.

unsigned BindingStrength

The binding strength of a token.

bool isObjCAccessSpecifier() const

const FormatToken * getNamespaceToken() const

Return the actual namespace token, if this token starts a namespace block.

bool isTypeName(const LangOptions &LangOpts) const

unsigned StartsBinaryExpression

true if this token starts a binary expression, i.e.

void setPackingKind(ParameterPackingKind K)

unsigned ClosesTemplateDeclaration

true if this is the ">" of "template<..>".

unsigned OperatorIndex

If this is an operator (or "."/"->") in a sequence of operators with the same precedence,...

bool MightBeFunctionDeclParen

Might be function declaration open/closing paren.

unsigned OriginalColumn

The original 0-based column of this token, including expanded tabs.

unsigned ContinuesLineCommentSection

Does this line comment continue a line comment section?

unsigned CanBreakBefore

true if it is allowed to break before this token.

bool isCppAlternativeOperatorKeyword() const

StringRef TokenText

The raw text of the token.

unsigned LongestObjCSelectorName

If this is the first ObjC selector name in an ObjC method definition or call, this contains the lengt...

ParameterPackingKind getPackingKind() const

SourceLocation getStartOfNonWhitespace() const

Returns actual token start location without leading escaped newlines and whitespace.

bool startsSequence(A K1, Ts... Tokens) const

true if this token starts a sequence with the given tokens in order, following the Next pointers,...

tok::TokenKind ParentBracket

If this is a bracket ("<", "(", "[" or "{"), contains the kind of the surrounding bracket.

unsigned LastNewlineOffset

The offset just past the last ' ' in this token's leading whitespace (relative to WhiteSpaceStart).

unsigned SplitPenalty

Penalty for inserting a line break before this token.

bool opensScope() const

Returns whether Tok is ([{ or an opening < of a template or in protos.

bool isPointerOrReference() const

FormatToken * getNextNonComment() const

Returns the next token ignoring comments.

void setDecision(FormatDecision D)

FormatToken * getPreviousNonComment() const

Returns the previous token ignoring comments.

SmallVector< prec::Level, 4 > FakeLParens

Stores the number of required fake parentheses and the corresponding operator precedence.

unsigned Finalized

If true, this token has been fully formatted (indented and potentially re-formatted inside),...

std::optional< MacroExpansion > MacroCtx

BraceBlockKind getBlockKind() const

FormatToken * Next

The next token in the unwrapped line.

unsigned IsMultiline

Whether the token text contains newlines (escaped or not).

unsigned EndsCppAttributeGroup

true if this token ends a group of C++ attributes.

unsigned NewlinesBefore

The number of newlines immediately before the Token.

void setBlockKind(BraceBlockKind BBK)

bool isIf(bool AllowConstexprMacro=true) const

unsigned SpacesRequiredBefore

The number of spaces that should be inserted before this token.

std::shared_ptr< TokenRole > Role

A token can have a special role that can carry extra information about the token's formatting.

unsigned MustBreakBefore

Whether there must be a line break before this token.

unsigned HasUnescapedNewline

Whether there is at least one unescaped newline before the Token.

unsigned PartOfMultiVariableDeclStmt

Is this token part of a DeclStmt defining multiple variables?

unsigned ColumnWidth

The width of the non-whitespace parts of the token (or its first line for multi-line tokens) in colum...

unsigned ObjCSelectorNameParts

If this is the first ObjC selector name in an ObjC method definition or call, this contains the numbe...

void setType(TokenType T)

bool HasFormFeedBefore

Has "\n\f\n" or "\n\f\r\n" before TokenText.

bool isFunctionLikeKeyword() const

Returns true if this is a keyword that can be used like a function call (e.g.

bool isStringLiteral() const

bool IsArrayInitializer

This starts an array initializer.

bool isBlockIndentedInitRBrace(const FormatStyle &Style) const

Returns true if this token ends a block indented initializer list.

bool closesScope() const

Returns whether Tok is )]} or a closing > of a template or in protos.

unsigned EndsBinaryExpression

true if this token ends a binary expression.

bool isBinaryOperator() const

bool isCppStructuredBinding(bool IsCpp) const

Returns whether the token is the left square bracket of a C++ structured binding declaration.

unsigned UnbreakableTailLength

The length of following tokens until the next natural split point, or the next token that can be brok...

prec::Level getPrecedence() const

FormatDecision getDecision() const

bool is(tok::TokenKind Kind) const

unsigned LastLineColumnWidth

Contains the width in columns of the last line of a multi-line token.

unsigned IndentLevel

The indent level of this token. Copied from the surrounding line.

bool opensBlockOrBlockTypeList(const FormatStyle &Style) const

Returns true if this tokens starts a block-type list, i.e.

unsigned BlockParameterCount

Number of parameters that are nested blocks, if this is "(", "[" or "<".

unsigned TotalLength

The total length of the unwrapped line up to and including this token.

bool hasWhitespaceBefore() const

Returns true if the range of whitespace immediately preceding the Token is not empty.

bool isOneOf(A K1, B K2) const

TokenType getType() const

Returns the token's type, e.g.

unsigned IsFirst

Indicates that this is the first token of the file.

bool isUnaryOperator() const

unsigned IsUnterminatedLiteral

Set to true if this token is an unterminated literal.

bool isTrailingComment() const

unsigned ClosesRequiresClause

true if this is the last token within requires clause.

unsigned ParameterIndex

The 0-based index of the parameter/argument.

int8_t BraceCount

Number of optional braces to be inserted after this token: -1: a single left brace 0: no braces >0: n...

bool isAccessSpecifierKeyword() const

bool canBePointerOrReferenceQualifier() const

unsigned ParameterCount

Number of parameters, if this is "(", "[" or "<".

bool isAccessSpecifier(bool ColonRequired=true) const

bool StartsColumn

The first token in set of column elements.

bool isTypeOrIdentifier(const LangOptions &LangOpts) const

SourceRange WhitespaceRange

The range of the whitespace immediately preceding the Token.

FormatToken * NextOperator

If this is an operator (or "."/"->") in a sequence of operators with the same precedence,...

FormatToken * MatchingParen

If this is a bracket, this points to the matching one.

void copyFrom(const FormatToken &Tok)

void overwriteFixedType(TokenType T)

FormatToken * Previous

The previous token in the unwrapped line.

bool isLabelString() const

Returns true if this is a string literal that's like a label, e.g.

bool endsSequence(A K1, Ts... Tokens) const

true if this token ends a sequence with the given tokens in order, following the Previous pointers,...

void setFinalizedType(TokenType T)

Sets the type and also the finalized flag.

The current state when indenting a unwrapped line.

Contains information on the token's role in a macro expansion.

llvm::SmallVector< FormatToken *, 1 > ExpandedFrom

The stack of macro call identifier tokens this token was expanded from.

unsigned StartOfExpansion

The number of expansions of which this macro is the first entry.

MacroRole Role

The token's role in the macro expansion.

unsigned EndOfExpansion

The number of currently open expansions in ExpandedFrom this macro is the last token in.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4