blark.html.CodeSpan

class blark.html.CodeSpan(start: 'int', end: 'int')[source]

Bases: object

Methods

__init__(start, end)

contains(other)

Determine if the code span contains another code span

of(item)

Get the code span of the given Tree or Token

Attributes

start

Start position (inclusive)

end

End position (exclusive)

start: int

Start position (inclusive)

end: int

End position (exclusive)

static of(item: Tree | Token) CodeSpan | None[source]

Get the code span of the given Tree or Token

contains(other: CodeSpan) bool[source]

Determine if the code span contains another code span

__init__(start: int, end: int) None