clang 20.0.0git
Classes | Namespaces | Functions
Tokens.h File Reference
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Token.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
#include <tuple>

Go to the source code of this file.

Classes

struct  clang::syntax::FileRange
 A half-open character range inside a particular file, the start offset is included and the end offset is excluded from the range. More...
 
class  clang::syntax::Token
 A token coming directly from a file or from a macro invocation. More...
 
class  clang::syntax::TokenBuffer
 A list of tokens obtained by preprocessing a text buffer and operations to map between the expanded and spelled tokens, i.e. More...
 
struct  clang::syntax::TokenBuffer::Expansion
 An expansion produced by the preprocessor, includes macro expansions and preprocessor directives. More...
 
class  clang::syntax::TokenCollector
 Collects tokens for the main file while running the frontend action. More...
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::syntax
 

Functions

llvm::raw_ostream & clang::syntax::operator<< (llvm::raw_ostream &OS, const FileRange &R)
 For debugging purposes.
 
llvm::raw_ostream & clang::syntax::operator<< (llvm::raw_ostream &OS, const Token &T)
 For debugging purposes. Equivalent to a call to Token::str().
 
llvm::ArrayRef< syntax::Tokenclang::syntax::spelledTokensTouching (SourceLocation Loc, const syntax::TokenBuffer &Tokens)
 The spelled tokens that overlap or touch a spelling location Loc.
 
llvm::ArrayRef< syntax::Tokenclang::syntax::spelledTokensTouching (SourceLocation Loc, llvm::ArrayRef< syntax::Token > Tokens)
 
const syntax::Tokenclang::syntax::spelledIdentifierTouching (SourceLocation Loc, llvm::ArrayRef< syntax::Token > Tokens)
 The identifier token that overlaps or touches a spelling location Loc.
 
const syntax::Tokenclang::syntax::spelledIdentifierTouching (SourceLocation Loc, const syntax::TokenBuffer &Tokens)
 
std::vector< syntax::Tokenclang::syntax::tokenize (FileID FID, const SourceManager &SM, const LangOptions &LO)
 Lex the text buffer, corresponding to FID, in raw mode and record the resulting spelled tokens.
 
std::vector< syntax::Tokenclang::syntax::tokenize (const FileRange &FR, const SourceManager &SM, const LangOptions &LO)
 Similar to one above, instead of whole file tokenizes a part of it.