class documentation

Creates container holding all the elements from the start of a parsed element to its end.

Method __eq__ :param other: The other object to compare to :type other: BaseContainer | list[(syntax.SemanticType | BaseContainer)] | syntax.SemanticType :rtype : bool
Method __getitem__ :param item: Index of the element to get :type item: int :rtype : (syntax.SemanticType | BaseContainer)
Method __getslice__ :param start: Start index of the slice :param end: End index of the slice :type start: int :type end: int :rtype : list[(syntax.SemanticType | BaseContainer)]
Method __init__ :param content: List of tokens to be added to the container :param optionals: List of optional tokens to be added to the container (from the parser) :param others: List of values to add to the .format() method :type content: (list[(syntax...
Method __invert__ Returns the inverted optionals of the container. :rtype : BaseContainer
Method __iter__ :ytype : iter[syntax.SemanticType]
Method __len__ :rtype : int
Method __repr__ :rtype : str
Method __rshift__ :param other: The name of the map element to get :type other: str :rtype : (syntax.SemanticType | BaseContainer)
Method __setitem__ :param key: Index of the element to set :param value: Value to set :type key: int :type value: (syntax.SemanticType | BaseContainer)
Method __str__ :rtype : str
Method add Adds a list of elements to the container. :param other: List of elements to add :type other: syntax.SemanticType :return: None
Method class_name A string representation of the class name. :rtype : str
Method debug_map Prints the map of the container. :return: None
Method export Export the container to a string. :type exm: export.ExportManager :rtype : str
Method get_content Get the content of any BaseContainer object (default self.content). :param exm: ExportManager to use for exporting :param arbitrary_list: List to get the content from :type exm: export.ExportManager :type arbitrary_list: list[BaseContainer] :rtype : str...
Method get_optionals Get the optionals of the container. :rtype : (syntax.SemanticType | BaseContainer) :return: The optionals of the container
Method get_others Get the other values of the container. :rtype : dict[str, str] :return: The other values of the container
Method print_all Prints the container and all its content.
Method to_container Returns a container with the same content as the current container. Used for compatibility with the syntax for encapsulation.
Method validate Takes a list as input and checks if every element is in map. :param other: List of elements to check :type other: list[(syntax.SemanticType | BaseContainer)] :return: True if every element is in map, False otherwise...
Class Variable subtype Undocumented
Class Variable type Undocumented
Instance Variable content Undocumented
Instance Variable indentation_level Undocumented
Instance Variable map Undocumented
Instance Variable optionals Undocumented
Instance Variable others Undocumented
def __eq__(self, other):

:param other: The other object to compare to :type other: BaseContainer | list[(syntax.SemanticType | BaseContainer)] | syntax.SemanticType :rtype : bool

def __getitem__(self, item):

:param item: Index of the element to get :type item: int :rtype : (syntax.SemanticType | BaseContainer)

def __getslice__(self, start, end):

:param start: Start index of the slice :param end: End index of the slice :type start: int :type end: int :rtype : list[(syntax.SemanticType | BaseContainer)]

def __init__(self, content=None, optionals=None, others=None):

:param content: List of tokens to be added to the container :param optionals: List of optional tokens to be added to the container (from the parser) :param others: List of values to add to the .format() method :type content: (list[(syntax.SemanticType | BaseContainer)]) :type optionals: (syntax.SemanticType) :type others: (dict[str, str])

def __invert__(self):

Returns the inverted optionals of the container. :rtype : BaseContainer

def __iter__(self):

:ytype : iter[syntax.SemanticType]

def __len__(self):

:rtype : int

def __repr__(self):

:rtype : str

def __rshift__(self, other):

:param other: The name of the map element to get :type other: str :rtype : (syntax.SemanticType | BaseContainer)

def __setitem__(self, key, value):

:param key: Index of the element to set :param value: Value to set :type key: int :type value: (syntax.SemanticType | BaseContainer)

def __str__(self):

:rtype : str

def add(self, other):

Adds a list of elements to the container. :param other: List of elements to add :type other: syntax.SemanticType :return: None

def class_name(self):

A string representation of the class name. :rtype : str

def debug_map(self):

Prints the map of the container. :return: None

def get_content(self, exm, arbitrary_list=None):

Get the content of any BaseContainer object (default self.content). :param exm: ExportManager to use for exporting :param arbitrary_list: List to get the content from :type exm: export.ExportManager :type arbitrary_list: list[BaseContainer] :rtype : str

def get_optionals(self):

Get the optionals of the container. :rtype : (syntax.SemanticType | BaseContainer) :return: The optionals of the container

def get_others(self):

Get the other values of the container. :rtype : dict[str, str] :return: The other values of the container

def print_all(self, ident=''):

Prints the container and all its content.

def to_container(self, filter_func=None):

Returns a container with the same content as the current container. Used for compatibility with the syntax for encapsulation.

def validate(self, other):

Takes a list as input and checks if every element is in map. :param other: List of elements to check :type other: list[(syntax.SemanticType | BaseContainer)] :return: True if every element is in map, False otherwise

content =

Undocumented

indentation_level: int =

Undocumented

map: dict =

Undocumented

optionals =

Undocumented

others: dict =