Module source_code

Source

Structs§

LineIndex
Index for fast byte offset to SourceLocation conversions.
LinearLocator
Converts source code byte-offset to Python convention line and column numbers.
LocatedError
OneIndexed
Type-safe wrapper for a value whose logical range starts at 1, for instance the line or column numbers in a file
RandomLocator
Converts source code byte-offset to Python convention line and column numbers.
SourceCode
Gives access to the source code of a file and allows mapping between TextSize and SourceLocation.
SourceLocation
SourceRange
UniversalNewlineIterator
Like str, but accommodates LF, CRLF, and CR line endings, the latter of which are not supported by str.

Functions§

find_newline
Finds the next newline character. Returns its position and the LineEnding.

Type Aliases§

LineNumber
Morty Proxy This is a proxified and sanitized view of the page, visit original site.