Codegen whitespace fixes

This commit is contained in:
Bruno de Oliveira Abinader 2014-12-30 11:24:54 -04:00
parent de3cff0e08
commit c950e3d61e

View file

@ -1204,8 +1204,8 @@ class MethodDefiner(PropertyDefiner):
decls = ''.join([stringDecl(m) for m in array]) decls = ''.join([stringDecl(m) for m in array])
return decls + self.generatePrefableArray( return decls + self.generatePrefableArray(
array, name, array, name,
' JSFunctionSpec {name: &%s_name as *const u8 as *const libc::c_char, call: JSNativeWrapper {op: Some(%s), info: %s}, nargs: %s, flags: %s as u16, selfHostedName: 0 as *const libc::c_char }', ' JSFunctionSpec { name: &%s_name as *const u8 as *const libc::c_char, call: JSNativeWrapper {op: Some(%s), info: %s}, nargs: %s, flags: %s as u16, selfHostedName: 0 as *const libc::c_char }',
' JSFunctionSpec {name: 0 as *const libc::c_char, call: JSNativeWrapper {op: None, info: 0 as *const JSJitInfo}, nargs: 0, flags: 0, selfHostedName: 0 as *const libc::c_char }', ' JSFunctionSpec { name: 0 as *const libc::c_char, call: JSNativeWrapper {op: None, info: 0 as *const JSJitInfo}, nargs: 0, flags: 0, selfHostedName: 0 as *const libc::c_char }',
'JSFunctionSpec', 'JSFunctionSpec',
specData) specData)
@ -3366,7 +3366,7 @@ class ClassEnum(ClassItem):
entry = '%s = %s' % (self.entries[i], self.values[i]) entry = '%s = %s' % (self.entries[i], self.values[i])
entries.append(entry) entries.append(entry)
name = '' if not self.name else ' ' + self.name name = '' if not self.name else ' ' + self.name
return 'enum%s\n{\n %s\n};\n' % (name, ',\n '.join(entries)) return 'enum%s\n{\n%s\n};\n' % (name, ',\n '.join(entries))
def define(self, cgClass): def define(self, cgClass):
# Only goes in the header # Only goes in the header
@ -3378,7 +3378,7 @@ class ClassUnion(ClassItem):
ClassItem.__init__(self, name, visibility) ClassItem.__init__(self, name, visibility)
def declare(self, cgClass): def declare(self, cgClass):
return 'union %s\n{\n %s\n};\n' % (self.name, '\n '.join(self.entries)) return 'union %s\n{\n%s\n};\n' % (self.name, '\n '.join(self.entries))
def define(self, cgClass): def define(self, cgClass):
# Only goes in the header # Only goes in the header
@ -3893,7 +3893,7 @@ if expando.is_not_null() {
getNamed = "" getNamed = ""
return """//MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy), return """//MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(proxy),
//"Should not have a XrayWrapper here"); //"Should not have a XrayWrapper here");
%s %s
let mut found = false; let mut found = false;