struct UnwrappedLine

Declaration

struct UnwrappedLine { /* full declaration omitted */ };

Description

An unwrapped line is a sequence of \c Token, that we would like to put on a single line if there was no column limit. This is used as a main interface between the \c UnwrappedLineParser and the\c UnwrappedLineFormatter. The key property is that changing the formatting within an unwrapped line does not affect any other unwrapped lines.

Declared at: clang/lib/Format/UnwrappedLineParser.h:38

Member Variables

public std::list<UnwrappedLineNode> Tokens
The \c Tokens comprising this \c UnwrappedLine.
public unsigned int Level
The indent level of the \c UnwrappedLine.
public bool InPPDirective
Whether this \c UnwrappedLine is part of a preprocessor directive.
public bool MustBeDeclaration
public size_t MatchingOpeningBlockLineIndex = kInvalidIndex
If this \c UnwrappedLine closes a block in a sequence of lines,\c MatchingOpeningBlockLineIndex stores the index of the corresponding opening line. Otherwise, \c MatchingOpeningBlockLineIndex must be\c kInvalidIndex.
public size_t MatchingClosingBlockLineIndex = kInvalidIndex
If this \c UnwrappedLine opens a block, stores the index of the line with the corresponding closing brace.
public unsigned int FirstStartColumn = 0
public static const size_t kInvalidIndex = -1

Method Overview

Methods

ΒΆUnwrappedLine()

Declared at: clang/lib/Format/UnwrappedLineParser.h:39