Common

The Common module contains different classes widely used in all backends.

Mutators

Some Mutator are declared on the Mutators module.

AbstractMutator

As you may see on the diagram, all mutators inherits from AbstractMutator.

AstSupport

Additional mutators are provided in order to easier the backend writing process.

Filter visitors

Warning

Some cleaning needs to be done in this module.

In order to search nodes on the AST, the programmer needs to implements a Filter. GenericFilterVisitor is the parent of all filters, defining the commom methods of all filters.

This module has other members, which are concrete implementations of the GenericFilterVisitor.

Files

This module has some members in order to store some source code files:

class Backends.Common.Files.FileTypes.Makefile_FileType

Class to store makefile source code

class Backends.Common.Files.FileTypes.Template_FileType

Represents a file which contains a template that it could be convert into a simple text.

pretty_print(text)

Return a pretty representation of the file

Parameters:text – The original text to be pretty printed
render(text, **kwargs)

Return a string after the renderization of the content

Parameters:
  • text – The template
  • kwargs – The list of variables to be passed to the template

Table Of Contents

Previous topic

Backends

Next topic

Dot Backend

This Page