diff options
author | Jack Moffitt <jack@metajack.im> | 2014-08-28 09:34:23 -0600 |
---|---|---|
committer | Jack Moffitt <jack@metajack.im> | 2014-09-08 20:21:42 -0600 |
commit | c6ab60dbfc6da7b4f800c9e40893c8b58413960c (patch) | |
tree | d1d74076cf7fa20e4f77ec7cb82cae98b67362cb /src/components/script/dom/bindings/codegen/BindingGen.py | |
parent | db2f642c32fc5bed445bb6f2e45b0f6f0b4342cf (diff) | |
download | servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.tar.gz servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.zip |
Cargoify servo
Diffstat (limited to 'src/components/script/dom/bindings/codegen/BindingGen.py')
-rw-r--r-- | src/components/script/dom/bindings/codegen/BindingGen.py | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/components/script/dom/bindings/codegen/BindingGen.py b/src/components/script/dom/bindings/codegen/BindingGen.py deleted file mode 100644 index 408280dacfb..00000000000 --- a/src/components/script/dom/bindings/codegen/BindingGen.py +++ /dev/null @@ -1,52 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -import sys -sys.path.append("./parser/") -sys.path.append("./ply/") -import os -import cPickle -import WebIDL -from Configuration import * -from CodegenRust import CGBindingRoot, replaceFileIfChanged - -def generate_binding_rs(config, outputprefix, webidlfile): - """ - |config| Is the configuration object. - |outputprefix| is a prefix to use for the header guards and filename. - """ - - filename = outputprefix + ".rs" - root = CGBindingRoot(config, outputprefix, webidlfile) - if replaceFileIfChanged(filename, root.define()): - print "Generating binding implementation: %s" % (filename) - -def main(): - # Parse arguments. - from optparse import OptionParser - usagestring = "usage: %prog configFile outputPrefix webIDLFile" - o = OptionParser(usage=usagestring) - o.add_option("--verbose-errors", action='store_true', default=False, - help="When an error happens, display the Python traceback.") - (options, args) = o.parse_args() - - if len(args) != 3: - o.error(usagestring) - configFile = os.path.normpath(args[0]) - outputPrefix = args[1] - webIDLFile = os.path.normpath(args[2]) - - # Load the parsing results - f = open('ParserResults.pkl', 'rb') - parserData = cPickle.load(f) - f.close() - - # Create the configuration data. - config = Configuration(configFile, parserData) - - # Generate the prototype classes. - generate_binding_rs(config, outputPrefix, webIDLFile); - -if __name__ == '__main__': - main() |