class FinalSemanticType(SemanticType):
Known subclasses: bootstraparse.modules.syntax.DisplayToken, bootstraparse.modules.syntax.EmptySemanticType, bootstraparse.modules.syntax.EtOlistToken, bootstraparse.modules.syntax.EtUlistToken, bootstraparse.modules.syntax.HeaderToken, bootstraparse.modules.syntax.HyperlinkToken
Semantic type used by the context manager to ascertain token is possible to encapsulate.
| Method | counterpart |
Function called by the context manager to know how to deal with the encapsulation of the token. Will return the counterpart of the token (the previous token to look for). :return: The counterpart of the token... |
| Method | to |
Function called by the context manager to know how to deal with the encapsulation of the token. :param filter_func: A function that will be used to filter the content of the token. :type filter_func: (callable| None) :return: Self if containable, the expected replacement token if it can, raises an error otherwise... |
Inherited from SemanticType:
| Method | __eq__ |
Undocumented |
| Method | __init__ |
Initialises the token. :param content: The content of the token. :type content: list[pp.ParseResults] |
| Method | __ne__ |
Undocumented |
| Method | __repr__ |
Undocumented |
| Method | __str__ |
Undocumented |
| Method | to |
Function used for testing and readability purposes. Replaces matched markup with html-like tags. :return: The markup of the token. :rtype: str |
| Method | to |
Return the original string of the token. :return: The original string of the token. :rtype: str |
| Class Variable | label |
Undocumented |
| Instance Variable | content |
Undocumented |
| Instance Variable | file |
Undocumented |
| Instance Variable | label |
Undocumented |
| Instance Variable | line |
Undocumented |
Function called by the context manager to know how to deal with the encapsulation of the token. Will return the counterpart of the token (the previous token to look for). :return: The counterpart of the token. :rtype: str | None
bootstraparse.modules.syntax.TextTokenFunction called by the context manager to know how to deal with the encapsulation of the token. :param filter_func: A function that will be used to filter the content of the token. :type filter_func: (callable| None) :return: Self if containable, the expected replacement token if it can, raises an error otherwise. :rtype: SemanticType | context_mngr.BaseContainer :raises CannotBeContainedError: Raises error if the token we were trying to encapsulate cannot be (probably mismatched).