Lines Matching refs:Level
28 /// \brief Tracks the indent level of \c AnnotatedLines across levels.
35 /// subsequent lines on the same level to be indented at the same level as the
54 // Update the indent level cache size so that we can rely on it
56 while (IndentForLevel.size() <= Line.Level)
59 Indent = Line.Level * Style.IndentWidth + AdditionalIndent;
61 IndentForLevel.resize(Line.Level + 1);
62 Indent = getIndent(IndentForLevel, Line.Level);
68 /// \brief Update the level indent to adapt to the given \p Line.
71 /// level to the same indent.
77 if ((!Line.First->is(tok::comment) || IndentForLevel[Line.Level] == -1) &&
79 IndentForLevel[Line.Level] = LevelIndent;
83 /// \brief Get the offset of the line relatively to the level.
86 /// characters to the left from their level.
99 /// \brief Get the indent of \p Level from \p IndentForLevel.
101 /// \p IndentForLevel must contain the indent for the level \c l
103 /// that level is unknown.
104 unsigned getIndent(ArrayRef<int> IndentForLevel, unsigned Level) {
105 if (IndentForLevel[Level] != -1)
106 return IndentForLevel[Level];
107 if (Level == 0)
109 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth;
116 /// \brief The indent in characters for each level.
119 /// \brief Offset of the current line relative to the indent level.
188 // FIXME: TheLine->Level != 0 might or might not be the right check to do.
195 TheLine->Level != 0);
521 Previous.Children[0]->Level * Style.IndentWidth;
811 LevelIndentTracker IndentTracker(Style, Keywords, Lines[0]->Level,
816 // The minimum level of consecutive lines that have been formatted.
830 TheLine.Level > RangeMinLevel ||
831 (TheLine.Level == RangeMinLevel && !TheLine.startsWith(tok::r_brace));
843 formatFirstToken(*TheLine.First, PreviousLine, TheLine.Level, Indent,
863 RangeMinLevel = std::min(RangeMinLevel, TheLine.Level);
872 // Adapt following lines on the current indent level to the same level
884 formatFirstToken(*TheLine.First, PreviousLine, TheLine.Level,