scenic.syntax.compiler

Summary of Module Members

Functions

compileScenicAST

Compiles Scenic AST to Python AST

unquote

Classes

AtomicCheckTransformer

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:
Return type:

Tuple[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.

_generate_next_value_(start, count, last_values)

Generate the next value when not given.

name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None