OpenQuizz
Une application de gestion des contenus pédagogiques
Token Class Reference
Inheritance diagram for Token:
Collaboration diagram for Token:

Public Member Functions

def __new__ (cls, lineno, type, value)
 
def __str__ (self)
 
def test (self, expr)
 
def test_any (self, *iterable)
 
def __repr__ (self)
 

Static Public Attributes

 lineno
 
 type
 
 value
 

Detailed Description

Token class.

Member Function Documentation

◆ __new__()

def __new__ (   cls,
  lineno,
  type,
  value 
)

◆ __repr__()

def __repr__ (   self)

◆ __str__()

def __str__ (   self)

◆ test()

def test (   self,
  expr 
)
Test a token against a token expression.  This can either be a
token type or ``'token_type:token_value'``.  This can only test
against string values and types.

◆ test_any()

def test_any (   self,
iterable 
)
Test against multiple token expressions.

Field Documentation

◆ lineno

lineno
static

◆ type

type
static

◆ value

value
static

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