clang 20.0.0git
Classes | Public Member Functions | List of all members
clang::comments::TextTokenRetokenizer Class Reference

Re-lexes a sequence of tok::text tokens. More...

Public Member Functions

 TextTokenRetokenizer (llvm::BumpPtrAllocator &Allocator, Parser &P)
 
bool lexType (Token &Tok)
 Extract a type argument.
 
bool startsWithParCommand ()
 
bool lexParHeading (Token &Tok)
 Extract a par command argument-header.
 
bool lexWord (Token &Tok)
 Extract a word – sequence of non-whitespace characters.
 
bool lexDelimitedSeq (Token &Tok, char OpenDelim, char CloseDelim)
 
void putBackLeftoverTokens ()
 Put back tokens that we didn't consume.
 

Detailed Description

Re-lexes a sequence of tok::text tokens.

Definition at line 30 of file CommentParser.cpp.

Constructor & Destructor Documentation

◆ TextTokenRetokenizer()

clang::comments::TextTokenRetokenizer::TextTokenRetokenizer ( llvm::BumpPtrAllocator &  Allocator,
Parser P 
)
inline

Definition at line 171 of file CommentParser.cpp.

References P.

Member Function Documentation

◆ lexDelimitedSeq()

bool clang::comments::TextTokenRetokenizer::lexDelimitedSeq ( Token Tok,
char  OpenDelim,
char  CloseDelim 
)
inline

Definition at line 316 of file CommentParser.cpp.

References clang::C, Loc, memcpy(), and Text.

Referenced by clang::comments::Parser::parseParamCommandArgs().

◆ lexParHeading()

bool clang::comments::TextTokenRetokenizer::lexParHeading ( Token Tok)
inline

Extract a par command argument-header.

Definition at line 242 of file CommentParser.cpp.

References Loc, memcpy(), startsWithParCommand(), and Text.

Referenced by clang::comments::Parser::parseParCommandArgs().

◆ lexType()

bool clang::comments::TextTokenRetokenizer::lexType ( Token Tok)
inline

Extract a type argument.

Definition at line 178 of file CommentParser.cpp.

References clang::C, clang::isWhitespace(), Loc, memcpy(), and Text.

Referenced by clang::comments::Parser::parseThrowCommandArgs().

◆ lexWord()

bool clang::comments::TextTokenRetokenizer::lexWord ( Token Tok)
inline

Extract a word – sequence of non-whitespace characters.

Definition at line 283 of file CommentParser.cpp.

References clang::C, clang::isWhitespace(), Loc, memcpy(), and Text.

Referenced by clang::comments::Parser::parseCommandArgs(), clang::comments::Parser::parseParamCommandArgs(), and clang::comments::Parser::parseTParamCommandArgs().

◆ putBackLeftoverTokens()

void clang::comments::TextTokenRetokenizer::putBackLeftoverTokens ( )
inline

Put back tokens that we didn't consume.

Definition at line 363 of file CommentParser.cpp.

References P.

Referenced by clang::comments::Parser::parseBlockCommand(), and clang::comments::Parser::parseInlineCommand().

◆ startsWithParCommand()

bool clang::comments::TextTokenRetokenizer::startsWithParCommand ( )
inline

Definition at line 226 of file CommentParser.cpp.

References clang::isWhitespace().

Referenced by lexParHeading().


The documentation for this class was generated from the following file: