Home | History | Annotate | Download | only in Format

Lines Matching refs:Line

37   ScopedDeclarationState(UnwrappedLine &Line, std::vector<bool> &Stack,
39 : Line(Line), Stack(Stack) {
40 Line.MustBeDeclaration = MustBeDeclaration;
46 Line.MustBeDeclaration = Stack.back();
48 Line.MustBeDeclaration = true;
52 UnwrappedLine &Line;
58 ScopedMacroState(UnwrappedLine &Line, FormatTokenSource *&TokenSource,
60 : Line(Line), TokenSource(TokenSource), ResetToken(ResetToken),
61 PreviousLineLevel(Line.Level), PreviousTokenSource(TokenSource),
65 Line.Level = 0;
66 Line.InPPDirective = true;
72 Line.InPPDirective = false;
73 Line.Level = PreviousLineLevel;
108 UnwrappedLine &Line;
128 PreBlockLine = Parser.Line.take();
129 Parser.Line.reset(new UnwrappedLine());
130 Parser.Line->Level = PreBlockLine->Level;
131 Parser.Line->InPPDirective = PreBlockLine->InPPDirective;
135 if (!Parser.Line->Tokens.empty()) {
138 assert(Parser.Line->Tokens.empty());
139 Parser.Line.reset(PreBlockLine);
184 : Line(new UnwrappedLine), MustBreakBeforeNextToken(false),
199 // Create line with eof token.
201 Callback.consumeUnwrappedLine(*Line);
207 *Line, DeclarationScopeStack,
208 /*MustBeDeclaration=*/ !Line->InPPDirective);
239 Line->Level += Style.IndentCaseLabels;
324 unsigned InitialLevel = Line->Level;
329 ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
332 ++Line->Level;
336 Line->Level = InitialLevel;
342 Line->Level = InitialLevel;
347 ScopedMacroState MacroState(*Line, Tokens, FormatTok, StructuralError);
435 Line->Level = 1;
453 // unwrapped line. This is used in attempt to distinguish macro calls without
475 // first token in an unwrapped line.
610 if (Line->Tokens.size() == 1) {
734 ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
736 Line->Level += 1;
738 Line->Level -= 1;
772 ++Line->Level;
774 --Line->Level;
787 ++Line->Level;
789 --Line->Level;
811 // think. Puttin the semicolon into its own line is very ugly.
832 ++Line->Level;
834 --Line->Level;
847 ++Line->Level;
849 --Line->Level;
866 unsigned OldLineLevel = Line->Level;
867 if (Line->Level > 1 || (!Line->InPPDirective && Line->Level > 0))
868 --Line->Level;
874 // "break;" after "}" on its own line only for BS_Allman
881 Line->Level = OldLineLevel;
905 ++Line->Level;
907 --Line->Level;
937 ++Line->Level;
946 --Line->Level;
960 // "} n, m;" will end up in one unwrapped line.
1007 // will end up in one unwrapped line.
1044 // If instance variables are present, keep the '{' on the first line too.
1048 // With instance variables, this puts '}' on its own line. Without instance
1049 // variables, this ends the @interface line.
1073 if (Line->Tokens.empty())
1076 llvm::dbgs() << "Line(" << Line->Level << ")"
1077 << (Line->InPPDirective ? " MACRO" : "") << ": ";
1078 for (std::list<FormatToken *>::iterator I = Line->Tokens.begin(),
1079 E = Line->Tokens.end();
1085 CurrentLines->push_back(*Line);
1086 Line->Tokens.clear();
1101 bool JustComments = Line->Tokens.empty();
1129 while (!Line->InPPDirective && FormatTok->Tok.is(tok::hash) &&
1131 // If there is an unfinished unwrapped line, we flush the preprocessor
1132 // directives only after that unwrapped line was finished later.
1134 !Line->Tokens.empty() && CurrentLines == &Lines;
1144 !Line->InPPDirective) {
1162 Line->Tokens.push_back(Tok);
1164 Line->Tokens.back()->MustBreakBefore = true;