Example #1
0
 def visit_Attribute(self, node):
     value = self.visit(node.value)
     scope = self.scopeStack.peek()
     attr = sage.buildName(node.attr, scope)
     return sage.buildAttr(value, attr)
Example #2
0
 def visit_NoneType(self, node):
     scope = self.scopeStack.peek()
     return sage.buildName("None", scope)
Example #3
0
 def visit_alias(self, node):
     scope = self.scopeStack.peek()
     id = node.asname or node.name
     init = node.asname and self.visit(node.name)
     name = sage.buildName(id, scope)
     return (init and sage.buildAssign(name, init)) or name
Example #4
0
 def visit_Ellipsis(self, node):
     scope = self.scopeStack.peek()
     return sage.buildName("...", scope)
Example #5
0
 def visit_Name(self, node):
     scope = self.scopeStack.peek()
     return sage.buildName(node.id, scope)
 def visit_Attribute(self, node):
   value = self.visit(node.value)
   scope = self.scopeStack.peek()
   attr = sage.buildName(node.attr, scope)
   return sage.buildAttr(value, attr)
 def visit_alias(self, node):
   scope = self.scopeStack.peek()
   id = node.asname or node.name
   init = node.asname and self.visit(node.name)
   name = sage.buildName(id, scope)
   return (init and sage.buildAssign(name, init)) or name
 def visit_NoneType(self, node):
   scope = self.scopeStack.peek()
   return sage.buildName("None", scope)
 def visit_Name(self, node):
   scope = self.scopeStack.peek()
   return sage.buildName(node.id, scope)
Example #10
0
 def visit_Ellipsis(self, node):
   scope = self.scopeStack.peek()
   return sage.buildName("...", scope)