class documentation

class DefinedVariableTracker: (source)

View In Hierarchy

DefinedVariableTracker manages the state and scope for the UndefinedVariablesVisitor.

Method __init__ Undocumented
Method copy Undocumented
Method delete_var Undocumented
Method end_branch_statement Undocumented
Method enter_scope Undocumented
Method exit_scope Undocumented
Method in_scope Undocumented
Method is_defined_in_different_branch This will return true if a variable is defined in a branch that's not the current branch.
Method is_possibly_undefined Undocumented
Method is_undefined Undocumented
Method next_branch Undocumented
Method pop_undefined_ref If name has previously been reported as undefined, the NameExpr that was called will be returned.
Method record_definition Undocumented
Method record_undefined_ref Records an undefined reference. These can later be retrieved via `pop_undefined_ref`.
Method skip_branch Undocumented
Method start_branch_statement Undocumented
Instance Variable disable_branch_skip Undocumented
Instance Variable scopes Undocumented
Method _scope Undocumented
def __init__(self): (source)

Undocumented

Undocumented

def delete_var(self, name: str): (source)

Undocumented

def end_branch_statement(self): (source)

Undocumented

def enter_scope(self, scope_type: ScopeType): (source)

Undocumented

def exit_scope(self): (source)

Undocumented

def in_scope(self, scope_type: ScopeType) -> bool: (source)

Undocumented

def is_defined_in_different_branch(self, name: str) -> bool: (source)

This will return true if a variable is defined in a branch that's not the current branch.

def is_possibly_undefined(self, name: str) -> bool: (source)

Undocumented

def is_undefined(self, name: str) -> bool: (source)

Undocumented

def next_branch(self): (source)

Undocumented

def pop_undefined_ref(self, name: str) -> set[NameExpr]: (source)

If name has previously been reported as undefined, the NameExpr that was called will be returned.

def record_definition(self, name: str): (source)

Undocumented

def record_undefined_ref(self, o: NameExpr): (source)

Records an undefined reference. These can later be retrieved via `pop_undefined_ref`.

def skip_branch(self): (source)

Undocumented

def start_branch_statement(self): (source)

Undocumented

disable_branch_skip: bool = (source)

Undocumented

Undocumented

def _scope(self) -> Scope: (source)

Undocumented