svgui/pyjs/pyjs.py
changeset 1752 d14ff9d7eb76
parent 1749 d73b64672238
child 1754 63f4af6bf6d9
equal deleted inserted replaced
1751:c28db6f7616b 1752:d14ff9d7eb76
   872                     staticmethod = True
   872                     staticmethod = True
   873 
   873 
   874         if staticmethod:
   874         if staticmethod:
   875             staticfunc = ast.Function([], class_name_+"."+node.name, node.argnames, node.defaults, node.flags, node.doc, node.code, node.lineno)
   875             staticfunc = ast.Function([], class_name_+"."+node.name, node.argnames, node.defaults, node.flags, node.doc, node.code, node.lineno)
   876             self._function(staticfunc, True)
   876             self._function(staticfunc, True)
   877             print >>self.output, "    " + UU+class_name_ + ".prototype.__class__." + node.name + " = " + class_name_+"."+node.name+";";
   877             print >>self.output, "    " + UU+class_name_ + ".prototype.__class__." + node.name + " = " + class_name_+"."+node.name+";"
   878             print >>self.output, "    " + UU+class_name_ + ".prototype.__class__." + node.name + ".static_method = true;";
   878             print >>self.output, "    " + UU+class_name_ + ".prototype.__class__." + node.name + ".static_method = true;"
   879             return
   879             return
   880         else:
   880         else:
   881             if len(arg_names) == 0:
   881             if len(arg_names) == 0:
   882                 raise TranslationError("methods must take an argument 'self' (in _method)", node)
   882                 raise TranslationError("methods must take an argument 'self' (in _method)", node)
   883             self.method_self = arg_names[0]
   883             self.method_self = arg_names[0]