Makros#

Qualified name: makros.Makros

class makros.Makros#

Bases: object

Responsible for tracking the progress of expensive tasks and objects that should not be run more than once. These include:

  • Boostrapping the library

  • Keeping a copy of the resolver (requires bootstrapping)

It also should be used for instantiating subclasses that depend on any of the above features. These include:

  • The parser

Methods

get

Gets the global instance of Makros.

get_parser

Returns a parser that is instanciated with access to the global resolver instance.

static get() Makros#

Gets the global instance of Makros. Makros should be a singleton for performance, hence the get method

Returns:

Makros: An instance of the makros object

get_parser(path: Path) MakroParser#

Returns a parser that is instanciated with access to the global resolver instance.

Args:

path (Path): The file you plan to be parsing. You can provide a fake path if you plan on parsing a string or a token list

Returns:

MakroParser: The parser that you should use for parsing the file