equal
deleted
inserted
replaced
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] |