16 #ifndef LLVM_CLANG_LIB_FORMAT_UNWRAPPEDLINEPARSER_H
17 #define LLVM_CLANG_LIB_FORMAT_UNWRAPPEDLINEPARSER_H
28 struct UnwrappedLineNode;
59 class FormatTokenSource;
73 void parseLevel(
bool HasOpeningBrace);
74 void parseBlock(
bool MustBeDeclaration,
bool AddLevel =
true,
75 bool MunchSemi =
true);
76 void parseChildBlock();
77 void parsePPDirective();
79 void parsePPIf(
bool IfDef);
83 void parsePPUnknown();
84 void parseStructuralElement();
85 bool tryToParseBracedList();
86 bool parseBracedList(
bool ContinueOnSemicolons =
false);
89 void parseIfThenElse();
91 void parseForOrWhileLoop();
94 void parseCaseLabel();
96 void parseNamespace();
98 void parseAccessSpecifier();
100 void parseJavaEnumBody();
102 void parseObjCProtocolList();
103 void parseObjCUntilAtEnd();
104 void parseObjCInterfaceOrImplementation();
105 void parseObjCProtocol();
106 void parseJavaScriptEs6ImportExport();
107 bool tryToParseLambda();
108 bool tryToParseLambdaIntroducer();
109 void tryToParseJSFunction();
110 void addUnwrappedLine();
114 void flushComments(
bool NewlineBeforeNext);
116 void calculateBraceTypes(
bool ExpectClassBody =
false);
122 void conditionalCompilationCondition(
bool Unreachable);
123 void conditionalCompilationStart(
bool Unreachable);
124 void conditionalCompilationAlternative();
125 void conditionalCompilationEnd();
132 std::unique_ptr<UnwrappedLine> Line;
140 bool MustBreakBeforeNextToken;
158 std::vector<bool> DeclarationScopeStack;
200 std::stack<int> PPChainBranchIndex;
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.