pyx#
Functions
- makros.macro_creation.pyx.create_class(name: str, body: str, extends: Optional[str] = None) str #
Creates a class function with the given name and body.
- Args:
name (str): The name of the class body (str): The body of the class, usually generated by program() extends (Optional[str], optional): The class that this class extends. Defaults to None.
- Returns:
str: The code for the class
- makros.macro_creation.pyx.create_func(name: str, args: str, body: str) str #
Creates the code for a python function.
- Args:
name (str): The name of the function args (str): The args that the function takes, separated by commas body (str): The body of the function, usually generated by program()
- Returns:
str: The function code
- makros.macro_creation.pyx.indent(text: str, indentation: str = ' ') str #
Indents the provided text to a specific amount of spaces.
- Args:
text (str): The code to be indented indentation (str, optional): The indentation value to be used. Defaults to ‘ ‘.
- Returns:
str: The returned code
- makros.macro_creation.pyx.program(*args) str #
This is used for generating a block of code that is separated by newlines.
- Returns:
str: The output code