diff options
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r-- | clang/lib/Format/FormatToken.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h index 2f53b338379d..0506cd554bcb 100644 --- a/clang/lib/Format/FormatToken.h +++ b/clang/lib/Format/FormatToken.h @@ -46,11 +46,13 @@ namespace format { TYPE(DesignatedInitializerLSquare) \ TYPE(DesignatedInitializerPeriod) \ TYPE(DictLiteral) \ + TYPE(FatArrow) \ TYPE(ForEachMacro) \ TYPE(FunctionAnnotationRParen) \ TYPE(FunctionDeclarationName) \ TYPE(FunctionLBrace) \ TYPE(FunctionTypeLParen) \ + TYPE(IfMacro) \ TYPE(ImplicitStringLiteral) \ TYPE(InheritanceColon) \ TYPE(InheritanceComma) \ @@ -61,17 +63,12 @@ namespace format { TYPE(JsComputedPropertyName) \ TYPE(JsExponentiation) \ TYPE(JsExponentiationEqual) \ - TYPE(JsFatArrow) \ - TYPE(JsNonNullAssertion) \ - TYPE(JsNullishCoalescingOperator) \ - TYPE(JsNullPropagatingOperator) \ + TYPE(JsPipePipeEqual) \ TYPE(JsPrivateIdentifier) \ TYPE(JsTypeColon) \ TYPE(JsTypeOperator) \ TYPE(JsTypeOptionalQuestion) \ TYPE(JsAndAndEqual) \ - TYPE(JsPipePipeEqual) \ - TYPE(JsNullishCoalescingEqual) \ TYPE(LambdaArrow) \ TYPE(LambdaLBrace) \ TYPE(LambdaLSquare) \ @@ -80,6 +77,10 @@ namespace format { TYPE(MacroBlockBegin) \ TYPE(MacroBlockEnd) \ TYPE(NamespaceMacro) \ + TYPE(NonNullAssertion) \ + TYPE(NullCoalescingEqual) \ + TYPE(NullCoalescingOperator) \ + TYPE(NullPropagatingOperator) \ TYPE(ObjCBlockLBrace) \ TYPE(ObjCBlockLParen) \ TYPE(ObjCDecl) \ @@ -113,8 +114,6 @@ namespace format { TYPE(CSharpStringLiteral) \ TYPE(CSharpNamedArgumentColon) \ TYPE(CSharpNullable) \ - TYPE(CSharpNullCoalescing) \ - TYPE(CSharpNullConditional) \ TYPE(CSharpNullConditionalLSquare) \ TYPE(CSharpGenericTypeConstraint) \ TYPE(CSharpGenericTypeConstraintColon) \ @@ -433,6 +432,15 @@ public: /// The next token in the unwrapped line. FormatToken *Next = nullptr; + /// The first token in set of column elements. + bool StartsColumn = false; + + /// This notes the start of the line of an array initializer. + bool ArrayInitializerLineStart = false; + + /// This starts an array initializer. + bool IsArrayInitializer = false; + /// If this token starts a block, this contains all the unwrapped lines /// in it. SmallVector<AnnotatedLine *, 1> Children; |