titus.pfaast.Subs

class titus.pfaast.Subs(name, lineno=None)[source]

Bases: titus.pfaast.Ast

Represents an unresolved substitution in the abstract syntax tree.

PrettyPFA can make substitutions with <<French quotes>>.

A PFA document is not valid if it contains any unresolved substitutions.

__init__(name, lineno=None)
Parameters:
  • name (string) – key for substitution
  • lineno (integer or None) – line number
asExpr(state)

Mini-AST method for representing as an expression.

asType(state)

Mini-AST method for representing as a type.

jsonNode(lineNumbers, memo)

Inserts self into the Pythonized JSON, which would make it unserializable.

toJson(lineNumbers=True)

Raises a syntax exception because unresolved substitutions are not allowed in valid PFA.

walk(task, version)

Raises a syntax exception because unresolved substitutions are not allowed in valid PFA.