pyrser/type_system/scope.py
def callInjector(self, old: Node, trans: Translator) -> Node:
        """ If don't have injector call from parent """
        if self.astTranslatorInjector is None:
            if self.parent is not None:
                # TODO: think if we forward for all StateScope
                # forward to parent scope
                return self.parent().callInjector(old, trans)
            else:
                raise TypeError("Must define an Translator Injector")
        return self.astTranslatorInjector(old, trans)
def callInjector(self, old: Node, trans: Translator) -> Node:
        if self.astTranslatorInjector is None:
            if self.parent is not None:
                # TODO: think if we forward for all StateScope
                # forward to parent scope
                return self.parent().callInjector(old, trans)
            else:
                raise TypeError("Must define an Translator Injector")
        return self.astTranslatorInjector(old, trans)
def callInjector ( self , old : Node , trans : Translator ) -> Node : if self . astTranslatorInjector is None : if self . parent is not None : # TODO: think if we forward for all StateScope # forward to parent scope return self . parent ( ) . callInjector ( old , trans ) else : raise TypeError ( "Must define an Translator Injector" ) return self . astTranslatorInjector ( old , trans )
If don't have injector call from parent
If don t have injector call from parent