clang 22.0.0git
clang::comments::Token Class Reference

Comment token. More...

#include "clang/AST/CommentLexer.h"

Public Member Functions

SourceLocation getLocation () const LLVM_READONLY
void setLocation (SourceLocation SL)
SourceLocation getEndLocation () const LLVM_READONLY
tok::TokenKind getKind () const LLVM_READONLY
void setKind (tok::TokenKind K)
bool is (tok::TokenKind K) const LLVM_READONLY
bool isNot (tok::TokenKind K) const LLVM_READONLY
unsigned getLength () const LLVM_READONLY
void setLength (unsigned L)
StringRef getText () const LLVM_READONLY
void setText (StringRef Text)
StringRef getUnknownCommandName () const LLVM_READONLY
void setUnknownCommandName (StringRef Name)
unsigned getCommandID () const LLVM_READONLY
void setCommandID (unsigned ID)
unsigned getVerbatimBlockID () const LLVM_READONLY
void setVerbatimBlockID (unsigned ID)
StringRef getVerbatimBlockText () const LLVM_READONLY
void setVerbatimBlockText (StringRef Text)
unsigned getVerbatimLineID () const LLVM_READONLY
void setVerbatimLineID (unsigned ID)
StringRef getVerbatimLineText () const LLVM_READONLY
void setVerbatimLineText (StringRef Text)
StringRef getHTMLTagStartName () const LLVM_READONLY
void setHTMLTagStartName (StringRef Name)
StringRef getHTMLIdent () const LLVM_READONLY
void setHTMLIdent (StringRef Name)
StringRef getHTMLQuotedString () const LLVM_READONLY
void setHTMLQuotedString (StringRef Str)
StringRef getHTMLTagEndName () const LLVM_READONLY
void setHTMLTagEndName (StringRef Name)
void dump (const Lexer &L, const SourceManager &SM) const

Friends

class Lexer
class TextTokenRetokenizer

Detailed Description

Comment token.

Definition at line 55 of file CommentLexer.h.

Member Function Documentation

◆ dump()

void clang::comments::Token::dump ( const Lexer & L,
const SourceManager & SM ) const

Definition at line 21 of file CommentLexer.cpp.

References clang::comments::Lexer::getSpelling(), Lexer, and SM.

◆ getCommandID()

unsigned clang::comments::Token::getCommandID ( ) const
inline

◆ getEndLocation()

◆ getHTMLIdent()

StringRef clang::comments::Token::getHTMLIdent ( ) const
inline

Definition at line 183 of file CommentLexer.h.

References clang::comments::tok::html_ident, and is().

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

◆ getHTMLQuotedString()

StringRef clang::comments::Token::getHTMLQuotedString ( ) const
inline

Definition at line 194 of file CommentLexer.h.

References clang::comments::tok::html_quoted_string, and is().

◆ getHTMLTagEndName()

StringRef clang::comments::Token::getHTMLTagEndName ( ) const
inline

Definition at line 205 of file CommentLexer.h.

References clang::comments::tok::html_end_tag, and is().

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

◆ getHTMLTagStartName()

StringRef clang::comments::Token::getHTMLTagStartName ( ) const
inline

Definition at line 172 of file CommentLexer.h.

References clang::comments::tok::html_start_tag, and is().

◆ getKind()

tok::TokenKind clang::comments::Token::getKind ( ) const
inline

Definition at line 89 of file CommentLexer.h.

◆ getLength()

unsigned clang::comments::Token::getLength ( ) const
inline

Definition at line 95 of file CommentLexer.h.

◆ getLocation()

◆ getText()

◆ getUnknownCommandName()

StringRef clang::comments::Token::getUnknownCommandName ( ) const
inline

Definition at line 109 of file CommentLexer.h.

References is(), and clang::comments::tok::unknown_command.

◆ getVerbatimBlockID()

unsigned clang::comments::Token::getVerbatimBlockID ( ) const
inline

◆ getVerbatimBlockText()

StringRef clang::comments::Token::getVerbatimBlockText ( ) const
inline

Definition at line 140 of file CommentLexer.h.

References is(), and clang::comments::tok::verbatim_block_line.

◆ getVerbatimLineID()

unsigned clang::comments::Token::getVerbatimLineID ( ) const
inline

◆ getVerbatimLineText()

StringRef clang::comments::Token::getVerbatimLineText ( ) const
inline

Definition at line 161 of file CommentLexer.h.

References is(), and clang::comments::tok::verbatim_line_text.

◆ is()

◆ isNot()

bool clang::comments::Token::isNot ( tok::TokenKind K) const
inline

Definition at line 93 of file CommentLexer.h.

◆ setCommandID()

void clang::comments::Token::setCommandID ( unsigned ID)
inline

◆ setHTMLIdent()

void clang::comments::Token::setHTMLIdent ( StringRef Name)
inline

Definition at line 188 of file CommentLexer.h.

References clang::comments::tok::html_ident, and is().

◆ setHTMLQuotedString()

void clang::comments::Token::setHTMLQuotedString ( StringRef Str)
inline

Definition at line 199 of file CommentLexer.h.

References clang::comments::tok::html_quoted_string, and is().

◆ setHTMLTagEndName()

void clang::comments::Token::setHTMLTagEndName ( StringRef Name)
inline

Definition at line 210 of file CommentLexer.h.

References clang::comments::tok::html_end_tag, and is().

◆ setHTMLTagStartName()

void clang::comments::Token::setHTMLTagStartName ( StringRef Name)
inline

Definition at line 177 of file CommentLexer.h.

References clang::comments::tok::html_start_tag, and is().

◆ setKind()

void clang::comments::Token::setKind ( tok::TokenKind K)
inline

Definition at line 90 of file CommentLexer.h.

◆ setLength()

void clang::comments::Token::setLength ( unsigned L)
inline

Definition at line 96 of file CommentLexer.h.

◆ setLocation()

void clang::comments::Token::setLocation ( SourceLocation SL)
inline

Definition at line 81 of file CommentLexer.h.

◆ setText()

void clang::comments::Token::setText ( StringRef Text)
inline

Definition at line 103 of file CommentLexer.h.

References is(), clang::Text, and clang::comments::tok::text.

◆ setUnknownCommandName()

void clang::comments::Token::setUnknownCommandName ( StringRef Name)
inline

Definition at line 114 of file CommentLexer.h.

References is(), and clang::comments::tok::unknown_command.

◆ setVerbatimBlockID()

void clang::comments::Token::setVerbatimBlockID ( unsigned ID)
inline

◆ setVerbatimBlockText()

void clang::comments::Token::setVerbatimBlockText ( StringRef Text)
inline

Definition at line 145 of file CommentLexer.h.

References is(), clang::Text, and clang::comments::tok::verbatim_block_line.

◆ setVerbatimLineID()

void clang::comments::Token::setVerbatimLineID ( unsigned ID)
inline

Definition at line 156 of file CommentLexer.h.

References is(), and clang::comments::tok::verbatim_line_name.

◆ setVerbatimLineText()

void clang::comments::Token::setVerbatimLineText ( StringRef Text)
inline

Definition at line 166 of file CommentLexer.h.

References is(), clang::Text, and clang::comments::tok::verbatim_line_text.

◆ Lexer

friend class Lexer
friend

Definition at line 56 of file CommentLexer.h.

References Lexer.

Referenced by dump(), and Lexer.

◆ TextTokenRetokenizer

friend class TextTokenRetokenizer
friend

Definition at line 57 of file CommentLexer.h.

References TextTokenRetokenizer.

Referenced by TextTokenRetokenizer.


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