scenic.syntax.compiler

Summary of Module Members

Functions

compileScenicAST

Compiles Scenic AST to Python AST

unquote

Classes

AttributeFinder

Utility class for finding all referenced attributes of a given name.

Context

An enumeration.

LocalFinder

Utility class for finding all local variables of a code block.

PropositionTransformer

ScenicToPythonTransformer

Transformer

Subclass of ast.NodeTransformer with a method for raising syntax errors.

Member Details

compileScenicAST(scenicAST, *, filename='<unknown>', inBehavior=False, inMonitor=False, inCompose=False, inSetup=False, inInterruptBlock=False)[source]

Compiles Scenic AST to Python AST

Parameters:
  • scenicAST (AST) –

  • filename (str) –

  • inBehavior (bool) –

  • inMonitor (bool) –

  • inCompose (bool) –

  • inSetup (bool) –

  • inInterruptBlock (bool) –

Return type:

Tuple[Union[AST, List[AST]], List[AST]]

class AttributeFinder(target)[source]

Bases: NodeVisitor

Utility class for finding all referenced attributes of a given name.

class LocalFinder[source]

Bases: NodeVisitor

Utility class for finding all local variables of a code block.

class Transformer(filename)[source]

Bases: NodeTransformer

Subclass of ast.NodeTransformer with a method for raising syntax errors.

class Context(value)[source]

Bases: IntFlag

An enumeration.