Home
last modified time | relevance | path

Searched refs:FormatTok (Results 1 – 6 of 6) sorted by relevance

/freebsd/contrib/llvm-project/clang/lib/Format/
H A DUnwrappedLineParser.cpp184 FormatTok = nullptr; in reset()
227 pushToken(FormatTok); in parse()
301 switch (FormatTok->Tok.getKind()) { in parseCSharpGenericTypeConstraint()
305 if (FormatTok->is(Keywords.kw_where)) { in parseCSharpGenericTypeConstraint()
320 switch (FormatTok->Tok.getKind()) { in parseCSharpAttribute()
369 if (FormatTok->isAttribute()) { in parseLevel()
371 if (FormatTok->is(tok::l_paren)) in parseLevel()
375 tok::TokenKind Kind = FormatTok->Tok.getKind(); in parseLevel()
376 if (FormatTok->is(TT_MacroBlockBegin)) in parseLevel()
378 else if (FormatTok in parseLevel()
1246 mustBeJSIdent(const AdditionalKeywords & Keywords,const FormatToken * FormatTok) mustBeJSIdent() argument
1261 mustBeJSIdentOrValue(const AdditionalKeywords & Keywords,const FormatToken * FormatTok) mustBeJSIdentOrValue() argument
1270 isJSDeclOrStmt(const AdditionalKeywords & Keywords,const FormatToken * FormatTok) isJSDeclOrStmt() argument
4612 isOnNewLine(const FormatToken & FormatTok) isOnNewLine() argument
4620 continuesLineCommentSection(const FormatToken & FormatTok,const UnwrappedLine & Line,const llvm::Regex & CommentPragmasRegex) continuesLineCommentSection() argument
4805 FormatToken *FormatTok = Comments[i]; distributeComments() local
[all...]
H A DFormatTokenLexer.cpp30 : FormatTok(nullptr), IsFirstToken(true), StateStack({LexerState::NORMAL}), in FormatTokenLexer()
1073 Token Tok = FormatTok->Tok; in getStashedToken()
1074 StringRef TokenText = FormatTok->TokenText; in getStashedToken()
1076 unsigned OriginalColumn = FormatTok->OriginalColumn; in getStashedToken()
1077 FormatTok = new (Allocator.Allocate()) FormatToken; in getStashedToken()
1078 FormatTok->Tok = Tok; in getStashedToken()
1080 FormatTok->Tok.getLocation().getLocWithOffset(Tok.getLength() - 1); in getStashedToken()
1081 FormatTok->Tok.setLocation(TokLocation); in getStashedToken()
1082 FormatTok->WhitespaceRange = SourceRange(TokLocation, TokLocation); in getStashedToken()
1083 FormatTok->TokenText = TokenText; in getStashedToken()
[all …]
H A DFormat.cpp2355 for (FormatToken *FormatTok = Line->First; FormatTok; in requoteJSStringLiteral() local
2356 FormatTok = FormatTok->Next) { in requoteJSStringLiteral()
2357 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral()
2358 if (FormatTok->Finalized || !FormatTok->isStringLiteral() || in requoteJSStringLiteral()
2370 SourceLocation Start = FormatTok->Tok.getLocation(); in requoteJSStringLiteral()
2383 Replace(FormatTok->Tok.getEndLoc().getLocWithOffset(-1), 1, in requoteJSStringLiteral()
2585 for (FormatToken *FormatTok = Line->First; FormatTok; in insertTrailingCommas() local
2586 FormatTok = FormatTok->Next) { in insertTrailingCommas()
2587 if (FormatTok->NewlinesBefore == 0) in insertTrailingCommas()
2589 FormatToken *Matching = FormatTok->MatchingParen; in insertTrailingCommas()
[all …]
H A DUnwrappedLineParser.h249 bool isOnNewLine(const FormatToken &FormatTok);
299 FormatToken *FormatTok = nullptr; variable
H A DFormatTokenLexer.h112 FormatToken *FormatTok; variable
H A DFormatToken.h1962 inline bool isLineComment(const FormatToken &FormatTok) { in isLineComment() argument
1963 return FormatTok.is(tok::comment) && !FormatTok.TokenText.starts_with("/*"); in isLineComment()
1969 inline bool continuesLineComment(const FormatToken &FormatTok, in continuesLineComment() argument
1976 return isLineComment(FormatTok) && FormatTok.NewlinesBefore == 1 && in continuesLineComment()
1978 FormatTok.OriginalColumn >= MinContinueColumn; in continuesLineComment()