Home | History | Annotate | Download | only in Format

Lines Matching refs:Line

27   ScopedDeclarationState(UnwrappedLine &Line, std::vector<bool> &Stack,
29 : Line(Line), Stack(Stack) {
30 Line.MustBeDeclaration = MustBeDeclaration;
36 Line.MustBeDeclaration = Stack.back();
38 Line.MustBeDeclaration = true;
41 UnwrappedLine &Line;
47 ScopedMacroState(UnwrappedLine &Line, FormatTokenSource *&TokenSource,
49 : Line(Line), TokenSource(TokenSource), ResetToken(ResetToken),
50 PreviousLineLevel(Line.Level), PreviousTokenSource(TokenSource) {
52 Line.Level = 0;
53 Line.InPPDirective = true;
59 Line.InPPDirective = false;
60 Line.Level = PreviousLineLevel;
85 UnwrappedLine &Line;
101 PreBlockLine = Parser.Line.take();
102 Parser.Line.reset(new UnwrappedLine());
103 Parser.Line->Level = PreBlockLine->Level;
104 Parser.Line->InPPDirective = PreBlockLine->InPPDirective;
108 if (!Parser.Line->Tokens.empty()) {
111 assert(Parser.Line->Tokens.empty());
112 Parser.Line.reset(PreBlockLine);
128 : Line(new UnwrappedLine), MustBreakBeforeNextToken(false),
142 // Create line with eof token.
144 Callback.consumeUnwrappedLine(*Line);
150 ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
200 ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
202 Line->Level += AddLevels;
206 Line->Level -= AddLevels;
211 Line->Level -= AddLevels;
217 ScopedMacroState MacroState(*Line, Tokens, FormatTok);
248 Line->Level = 1;
465 ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
467 Line->Level += 1;
469 Line->Level -= 1;
495 ++Line->Level;
497 --Line->Level;
508 ++Line->Level;
510 --Line->Level;
525 // think. Puttin the semicolon into its own line is very ugly.
544 ++Line->Level;
546 --Line->Level;
557 ++Line->Level;
559 --Line->Level;
576 unsigned OldLineLevel = Line->Level;
577 if (Line->Level > 0)
578 --Line->Level;
582 parseStructuralElement(); // "break;" after "}" goes on the same line.
585 Line->Level = OldLineLevel;
607 Line->Level += (Style.IndentCaseLabels ? 2 : 1);
609 Line->Level -= (Style.IndentCaseLabels ? 2 : 1);
637 ++Line->Level;
646 --Line->Level;
660 // "} n, m;" will end up in one unwrapped line.
702 // will end up in one unwrapped line.
739 // If instance variables are present, keep the '{' on the first line too.
743 // With instance variables, this puts '}' on its own line. Without instance
744 // variables, this ends the @interface line.
768 if (Line->Tokens.empty())
771 llvm::dbgs() << "Line(" << Line->Level << ")"
772 << (Line->InPPDirective ? " MACRO" : "") << ": ";
773 for (std::list<FormatToken>::iterator I = Line->Tokens.begin(),
774 E = Line->Tokens.end();
781 CurrentLines->push_back(*Line);
782 Line->Tokens.clear();
799 bool JustComments = Line->Tokens.empty();
827 while (!Line->InPPDirective && FormatTok.Tok.is(tok::hash) &&
830 // If there is an unfinished unwrapped line, we flush the preprocessor
831 // directives only after that unwrapped line was finished later.
832 bool SwitchToPreprocessorLines = !Line->Tokens.empty() &&
851 Line->Tokens.push_back(Tok);
853 Line->Tokens.back().MustBreakBefore = true;