aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/codegen/GlobalGen.py
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-03-11 13:24:10 +0100
committerMs2ger <ms2ger@gmail.com>2014-03-11 13:24:10 +0100
commitd71e43e71204e35c0bbefd51bb8a4abf2d1f328e (patch)
tree8d1353dd50d6af418ad8c40b461e89315a8b427e /src/components/script/dom/bindings/codegen/GlobalGen.py
parent6c3f67d71966bf3e97c058ee40eefc37e65440b8 (diff)
downloadservo-d71e43e71204e35c0bbefd51bb8a4abf2d1f328e.tar.gz
servo-d71e43e71204e35c0bbefd51bb8a4abf2d1f328e.zip
Remove a pointless argument to generate_file in GlobalGen.py.
Diffstat (limited to 'src/components/script/dom/bindings/codegen/GlobalGen.py')
-rw-r--r--src/components/script/dom/bindings/codegen/GlobalGen.py32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/components/script/dom/bindings/codegen/GlobalGen.py b/src/components/script/dom/bindings/codegen/GlobalGen.py
index bd8b3d70793..4898cf1a725 100644
--- a/src/components/script/dom/bindings/codegen/GlobalGen.py
+++ b/src/components/script/dom/bindings/codegen/GlobalGen.py
@@ -17,21 +17,13 @@ from CodegenRust import GlobalGenRoots, replaceFileIfChanged
# import Codegen in general, so we can set a variable on it
import Codegen
-def generate_file(config, name, action):
+def generate_file(config, name):
+ filename = name + '.rs'
root = getattr(GlobalGenRoots, name)(config)
- if action is 'declare':
- filename = name + '.rs'
- code = root.declare()
- elif action == 'declare+define':
- filename = name + '.rs'
- code = root.declare()
- root2 = getattr(GlobalGenRoots, name)(config)
- code += root2.define()
- else:
- assert action is 'define'
- filename = name + '.rs'
- code = root.define()
+ code = root.declare()
+ root2 = getattr(GlobalGenRoots, name)(config)
+ code += root2.define()
if replaceFileIfChanged(filename, code):
print "Generating %s" % (filename)
@@ -75,22 +67,22 @@ def main():
config = Configuration(configFile, parserResults)
# Generate the prototype list.
- generate_file(config, 'PrototypeList', 'declare+define')
+ generate_file(config, 'PrototypeList')
# Generate the common code.
- generate_file(config, 'RegisterBindings', 'declare+define')
+ generate_file(config, 'RegisterBindings')
# Generate the type list.
- generate_file(config, 'InterfaceTypes', 'declare+define')
+ generate_file(config, 'InterfaceTypes')
# Generate the type list.
- generate_file(config, 'InheritTypes', 'declare+define')
+ generate_file(config, 'InheritTypes')
# Generate the module declarations.
- generate_file(config, 'BindingDeclarations', 'declare+define')
+ generate_file(config, 'BindingDeclarations')
- generate_file(config, 'UnionTypes', 'declare+define')
- generate_file(config, 'UnionConversions', 'declare+define')
+ generate_file(config, 'UnionTypes')
+ generate_file(config, 'UnionConversions')
if __name__ == '__main__':
main()