Scarab  2.8.1
Project 8 C++ Utility Library
Public Member Functions | Static Private Attributes | List of all members
Token Class Reference
Inheritance diagram for Token:
Inheritance graph

Public Member Functions

def spelling (self)
 
def kind (self)
 
def location (self)
 
def extent (self)
 
def cursor (self)
 

Static Private Attributes

list _fields_
 

Detailed Description

Represents a single token from the preprocessor.

Tokens are effectively segments of source code. Source code is first parsed
into tokens before being converted into the AST and Cursors.

Tokens are obtained from parsed TranslationUnit instances. You currently
can't create tokens manually.

Definition at line 2977 of file cindex.py.

Member Function Documentation

◆ cursor()

def cursor (   self)
The Cursor this Token corresponds to.

Definition at line 3015 of file cindex.py.

◆ extent()

def extent (   self)
The SourceRange this Token occupies.

Definition at line 3010 of file cindex.py.

◆ kind()

def kind (   self)
Obtain the TokenKind of the current token.

Definition at line 3000 of file cindex.py.

◆ location()

def location (   self)
The SourceLocation this Token occurs at.

Definition at line 3005 of file cindex.py.

◆ spelling()

def spelling (   self)
The spelling of this token.

This is the textual representation of the token in source.

Definition at line 2992 of file cindex.py.

Member Data Documentation

◆ _fields_

list _fields_
staticprivate
Initial value:
= [
('int_data', c_uint * 4),
('ptr_data', c_void_p)
]

Definition at line 2986 of file cindex.py.


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