Token
Source code in pbi_parsers/base/tokens.py
text
property
Returns the text underlying the token.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The text of the token as a string. |
__eq__
Checks equality based on token type and text slice.
__hash__
position
Returns the start and end positions of the token.
Returns:
| Type | Description |
|---|---|
tuple[int, int]
|
tuple[int, int]: A tuple containing the start and end positions of the token within the source text. |