clang 8.0.0

Public Member Functions | List of all members
clang::comments::Lexer Class Reference

Comment lexer. More...

`#include "clang/AST/CommentLexer.h"`

## Public Member Functions
| Lexer (llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags, const CommandTraits &Traits, SourceLocation FileLoc, const char *BufferStart, const char *BufferEnd, bool ParseCommands=true)
void | lex (Token &T)
StringRef | getSpelling (const Token &Tok, const SourceManager &SourceMgr, bool *Invalid=nullptr) const

## Detailed Description

Comment lexer.

Definition at line 221 of file CommentLexer.h.

## Constructor & Destructor Documentation

## ◆ Lexer()

clang::comments::Lexer::Lexer | ( | llvm::BumpPtrAllocator & | Allocator,
|  | DiagnosticsEngine & | Diags,
|  | const CommandTraits & | Traits,
|  | SourceLocation | FileLoc,
|  | const char * | BufferStart,
|  | const char * | BufferEnd,
|  | bool | ParseCommands = `true`
| ) |  |

Definition at line 742 of file CommentLexer.cpp.

## Member Function Documentation

## ◆ getSpelling()

StringRef clang::comments::Lexer::getSpelling | ( | const Token & | Tok,
|  | const SourceManager & | SourceMgr,
|  | bool * | Invalid = `nullptr`
| ) |  | const

Definition at line 853 of file CommentLexer.cpp.

References Begin, clang::SourceManager::getBufferData(), clang::SourceManager::getDecomposedLoc(), clang::comments::Token::getLength(), and clang::comments::Token::getLocation().

Referenced by clang::comments::Token::dump().

## ◆ lex()

void clang::comments::Lexer::lex | ( | Token & | T | ) |

Definition at line 751 of file CommentLexer.cpp.

References clang::comments::tok::eof, and clang::comments::tok::newline.

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

- include/clang/AST/CommentLexer.h
- lib/AST/CommentLexer.cpp