class documentation

Allows us to access basic operations and identify each token parsed.

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 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_container 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...
Method to_markup Function used for testing and readability purposes. Replaces matched markup with html-like tags. :return: The markup of the token. :rtype: str
Method to_original 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_name Undocumented
Instance Variable label_container Undocumented
Instance Variable line_number Undocumented
def __eq__(self, other):

Undocumented

def __init__(self, content):

Initialises the token. :param content: The content of the token. :type content: list[pp.ParseResults]

def __ne__(self, other):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented

def counterpart(self):

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

def to_container(self, filter_func=None):

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. :rtype: SemanticType | context_mngr.BaseContainer :raises CannotBeContainedError: Raises error if the token we were trying to encapsulate cannot be (probably mismatched).

def to_markup(self):

Function used for testing and readability purposes. Replaces matched markup with html-like tags. :return: The markup of the token. :rtype: str

def to_original(self):

Return the original string of the token. :return: The original string of the token. :rtype: str

label =
overridden in bootstraparse.modules.syntax.AliasToken, bootstraparse.modules.syntax.BeAssignToken, bootstraparse.modules.syntax.BeValueToken, bootstraparse.modules.syntax.BlockQuoteAuthorToken, bootstraparse.modules.syntax.BlockQuoteToken, bootstraparse.modules.syntax.CodeToken, bootstraparse.modules.syntax.CodeToken, bootstraparse.modules.syntax.DisplayToken, bootstraparse.modules.syntax.EtCustomSpanToken, bootstraparse.modules.syntax.EtCustomSpanToken, bootstraparse.modules.syntax.EtCustomSpanToken, bootstraparse.modules.syntax.EtEmToken, bootstraparse.modules.syntax.EtEmToken, bootstraparse.modules.syntax.EtOlistToken, bootstraparse.modules.syntax.EtStrikethroughToken, bootstraparse.modules.syntax.EtStrikethroughToken, bootstraparse.modules.syntax.EtStrongToken, bootstraparse.modules.syntax.EtStrongToken, bootstraparse.modules.syntax.EtUlistToken, bootstraparse.modules.syntax.EtUnderlineToken, bootstraparse.modules.syntax.EtUnderlineToken, bootstraparse.modules.syntax.HeaderToken, bootstraparse.modules.syntax.HyperlinkToken, bootstraparse.modules.syntax.ImageToken, bootstraparse.modules.syntax.Linebreak, bootstraparse.modules.syntax.OptionalClassToken, bootstraparse.modules.syntax.OptionalInsertToken, bootstraparse.modules.syntax.OptionalToken, bootstraparse.modules.syntax.OptionalVarToken, bootstraparse.modules.syntax.StructuralElementEndToken, bootstraparse.modules.syntax.StructuralElementEndToken, bootstraparse.modules.syntax.StructuralElementStartToken, bootstraparse.modules.syntax.StructuralElementStartToken, bootstraparse.modules.syntax.StructuralElementStartToken, bootstraparse.modules.syntax.TableCellToken, bootstraparse.modules.syntax.TableRowToken, bootstraparse.modules.syntax.TableSeparatorToken, bootstraparse.modules.syntax.TableToken, bootstraparse.modules.syntax.TextToken, bootstraparse.modules.syntax.UnimplementedToken

Undocumented

content =

Undocumented

file_name: str =

Undocumented

label_container =

Undocumented

line_number: str =

Undocumented