class documentation

class ProgramGraphNode(object): (source)

View In Hierarchy

A single node in a Program Graph.

Corresponds to either a SyntaxNode or an Instruction (as in a ControlFlowGraph).

Method __init__ Undocumented
Method __repr__ Undocumented
Method has_instance_of Whether the node's instruction is an instance of type t.
Method has_instruction Undocumented
Instance Variable ast_node If available, the AST node corresponding to the ProgramGraphNode.
Instance Variable ast_type If available, the type of the AST node, as a string.
Instance Variable ast_value If available, the primitive Python value corresponding to the node.
Instance Variable id A unique id for the node.
Instance Variable instruction If applicable, the corresponding Instruction.
Instance Variable node_type One of the node types from pb.NodeType.
Instance Variable syntax For SYNTAX_NODEs, the syntax information stored in the node.
Property node Undocumented
def __init__(self): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def has_instance_of(self, t): (source)

Whether the node's instruction is an instance of type t.

def has_instruction(self): (source)

Undocumented

ast_node = (source)

If available, the AST node corresponding to the ProgramGraphNode.

ast_type: str = (source)

If available, the type of the AST node, as a string.

ast_value: str = (source)

If available, the primitive Python value corresponding to the node.

A unique id for the node.

instruction = (source)

If applicable, the corresponding Instruction.

node_type = (source)

One of the node types from pb.NodeType.

For SYNTAX_NODEs, the syntax information stored in the node.

Undocumented