aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/UnwrappedLineParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/UnwrappedLineParser.h')
-rw-r--r--lib/Format/UnwrappedLineParser.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 5db5e7ba21..f4fecc5ef0 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/lib/Format/UnwrappedLineParser.h
@@ -33,8 +33,8 @@ namespace format {
struct FormatToken {
FormatToken()
: NewlinesBefore(0), HasUnescapedNewline(false), WhiteSpaceLength(0),
- TokenLength(0), IsFirst(false), MustBreakBefore(false) {
- }
+ LastNewlineOffset(0), TokenLength(0), IsFirst(false),
+ MustBreakBefore(false) {}
/// \brief The \c Token.
Token Tok;
@@ -59,6 +59,10 @@ struct FormatToken {
/// the \c Token.
unsigned WhiteSpaceLength;
+ /// \brief The offset just past the last '\n' in this token's leading
+ /// whitespace (relative to \c WhiteSpaceStart). 0 if there is no '\n'.
+ unsigned LastNewlineOffset;
+
/// \brief The length of the non-whitespace parts of the token. This is
/// necessary because we need to handle escaped newlines that are stored
/// with the token.