#include "clang/AST/CommentLexer.h"
#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/CommentDiagnostic.h"
#include "clang/Basic/CharInfo.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/ErrorHandling.h"
namespace clang {
namespace comments {
void Token::dump(const Lexer &L, const SourceManager &SM) const { … }
static inline bool isHTMLNamedCharacterReferenceCharacter(char C) { … }
static inline bool isHTMLDecimalCharacterReferenceCharacter(char C) { … }
static inline bool isHTMLHexCharacterReferenceCharacter(char C) { … }
static inline StringRef convertCodePointToUTF8(
llvm::BumpPtrAllocator &Allocator,
unsigned CodePoint) { … }
namespace {
#include "clang/AST/CommentHTMLTags.inc"
#include "clang/AST/CommentHTMLNamedCharacterReferences.inc"
}
StringRef Lexer::resolveHTMLNamedCharacterReference(StringRef Name) const { … }
StringRef Lexer::resolveHTMLDecimalCharacterReference(StringRef Name) const { … }
StringRef Lexer::resolveHTMLHexCharacterReference(StringRef Name) const { … }
void Lexer::skipLineStartingDecorations() { … }
namespace {
const char *findNewline(const char *BufferPtr, const char *BufferEnd) { … }
const char *skipNewline(const char *BufferPtr, const char *BufferEnd) { … }
const char *skipNamedCharacterReference(const char *BufferPtr,
const char *BufferEnd) { … }
const char *skipDecimalCharacterReference(const char *BufferPtr,
const char *BufferEnd) { … }
const char *skipHexCharacterReference(const char *BufferPtr,
const char *BufferEnd) { … }
bool isHTMLIdentifierStartingCharacter(char C) { … }
bool isHTMLIdentifierCharacter(char C) { … }
const char *skipHTMLIdentifier(const char *BufferPtr, const char *BufferEnd) { … }
const char *skipHTMLQuotedString(const char *BufferPtr, const char *BufferEnd)
{ … }
const char *skipWhitespace(const char *BufferPtr, const char *BufferEnd) { … }
bool isWhitespace(const char *BufferPtr, const char *BufferEnd) { … }
bool isCommandNameStartCharacter(char C) { … }
bool isCommandNameCharacter(char C) { … }
const char *skipCommandName(const char *BufferPtr, const char *BufferEnd) { … }
const char *findBCPLCommentEnd(const char *BufferPtr, const char *BufferEnd) { … }
const char *findCCommentEnd(const char *BufferPtr, const char *BufferEnd) { … }
}
void Lexer::formTokenWithChars(Token &Result, const char *TokEnd,
tok::TokenKind Kind) { … }
const char *Lexer::skipTextToken() { … }
void Lexer::lexCommentText(Token &T) { … }
void Lexer::setupAndLexVerbatimBlock(Token &T,
const char *TextBegin,
char Marker, const CommandInfo *Info) { … }
void Lexer::lexVerbatimBlockFirstLine(Token &T) { … }
void Lexer::lexVerbatimBlockBody(Token &T) { … }
void Lexer::setupAndLexVerbatimLine(Token &T, const char *TextBegin,
const CommandInfo *Info) { … }
void Lexer::lexVerbatimLineText(Token &T) { … }
void Lexer::lexHTMLCharacterReference(Token &T) { … }
void Lexer::setupAndLexHTMLStartTag(Token &T) { … }
void Lexer::lexHTMLStartTag(Token &T) { … }
void Lexer::setupAndLexHTMLEndTag(Token &T) { … }
void Lexer::lexHTMLEndTag(Token &T) { … }
Lexer::Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags,
const CommandTraits &Traits, SourceLocation FileLoc,
const char *BufferStart, const char *BufferEnd, bool ParseCommands)
: … { … }
void Lexer::lex(Token &T) { … }
StringRef Lexer::getSpelling(const Token &Tok,
const SourceManager &SourceMgr) const { … }
}
}