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 readTokenWithJavaScriptASI();
85 void parseStructuralElement();
86 bool tryToParseBracedList();
87 bool parseBracedList(
bool ContinueOnSemicolons =
false);
90 void parseIfThenElse();
92 void parseForOrWhileLoop();
95 void parseCaseLabel();
97 void parseNamespace();
99 void parseAccessSpecifier();
101 void parseJavaEnumBody();
103 void parseObjCProtocolList();
104 void parseObjCUntilAtEnd();
105 void parseObjCInterfaceOrImplementation();
106 void parseObjCProtocol();
107 void parseJavaScriptEs6ImportExport();
108 bool tryToParseLambda();
109 bool tryToParseLambdaIntroducer();
110 void tryToParseJSFunction();
111 void addUnwrappedLine();
116 void flushComments(
bool NewlineBeforeNext);
118 void calculateBraceTypes(
bool ExpectClassBody =
false);
124 void conditionalCompilationCondition(
bool Unreachable);
125 void conditionalCompilationStart(
bool Unreachable);
126 void conditionalCompilationAlternative();
127 void conditionalCompilationEnd();
134 std::unique_ptr<UnwrappedLine> Line;
142 bool MustBreakBeforeNextToken;
160 std::vector<bool> DeclarationScopeStack;
202 std::stack<int> PPChainBranchIndex;
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.