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

Public Member Functions

def __init__ (self, value, name)
 
def __repr__ (self)
 

Static Public Member Functions

def from_value (value)
 
def register (value, name)
 

Public Attributes

 value
 
 name
 

Static Private Attributes

dictionary _value_map = {}
 

Detailed Description

Describes a specific type of a Token.

Definition at line 478 of file cindex.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  value,
  name 
)
Create a new TokenKind instance from a numeric value and a name.

Definition at line 483 of file cindex.py.

Member Function Documentation

◆ __repr__()

def __repr__ (   self)

Definition at line 488 of file cindex.py.

◆ from_value()

def from_value (   value)
static
Obtain a registered TokenKind instance from its value.

Definition at line 492 of file cindex.py.

◆ register()

def register (   value,
  name 
)
static
Register a new TokenKind enumeration.

This should only be called at module load time by code within this
package.

Definition at line 502 of file cindex.py.

Member Data Documentation

◆ _value_map

dictionary _value_map = {}
staticprivate

Definition at line 481 of file cindex.py.

◆ name

name

Definition at line 486 of file cindex.py.

◆ value

value

Definition at line 485 of file cindex.py.


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