def __init__(self, init_scope: Scope = None, parent: Scope = None): if init_scope is not None: self.scope_node = init_scope else: self.scope_node = Scope(is_namespace=False) if parent is not None: self.scope_node.set_parent(parent.scope_node) self.type_node = None self.need_feedback = False
class InferNode: """ An instance of this class is automatically attach on each AST Nodes by the inference algorithm during the inference process into the '.infer_node' attribute. The aim is to keep track of the correct Scope and the final EvalCtx for each AST Nodes. """ def __init__(self, init_scope: Scope=None, parent: Scope=None): if init_scope is not None: self.scope_node = init_scope else: self.scope_node = Scope(is_namespace=False) if parent is not None: self.scope_node.set_parent(parent.scope_node) self.type_node = None self.need_feedback = False
class InferNode: """ An instance of this class is automatically attach on each AST Nodes by the inference algorithm during the inference process into the '.infer_node' attribute. The aim is to keep track of the correct Scope and the final EvalCtx for each AST Nodes. """ def __init__(self, init_scope: Scope = None, parent: Scope = None): if init_scope is not None: self.scope_node = init_scope else: self.scope_node = Scope(is_namespace=False) if parent is not None: self.scope_node.set_parent(parent.scope_node) self.type_node = None self.need_feedback = False
def __init__(self, init_scope: Scope=None, parent: Scope=None): if init_scope is not None: self.scope_node = init_scope else: self.scope_node = Scope(is_namespace=False) if parent is not None: self.scope_node.set_parent(parent.scope_node) self.type_node = None self.need_feedback = False