Auxiliary Classes

SourceCodePosition

This class represents a (source code) position in the original document where a Token starts (and ends).

class pyTokenizer.SourceCodePosition(row: int, column: int, absolute: int)[source]

Bases: object

Represents a position in a source code file.

The class offers a linear position: Absolute in bytes from document or snippet start and a ragged 2 dimensional Row:Column position.

Row: int = None

Row or line in the document

Column: int = None

Column in the document

Absolute: int = None

Absolute character position (file offset) since document start.