buildingmotif.label_parsing.tokens#
Functions
|
Ensure a value is a token or constructs one from a given value. |
Classes
|
A constant token. |
|
A delimiter token. |
|
An identifier token. |
|
A null token. |
|
|
|
A token result. |
- ensure_token(token_or_constructor: Token | Type[Token], value)[source]#
Ensure a value is a token or constructs one from a given value.
- class Constant(value: URIRef)[source]#
A constant token. Contains a URI, probably some sort of Class
- value: URIRef#
- class TokenResult(value: str | None, token: Token, length: int, error: str | None = None, id: str | None = None)[source]#
A token result. Contains a token, the type of the token, the length of the token, and a possible error.
- value: str | None#
- length: int#
- error: str | None = None#
- id: str | None = None#