Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1466)

Unified Diff: mojo/public/tools/bindings/mojom_list_dart_outputs.py

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/tools/bindings/mojom_bindings_generator.py ('k') | mojo/public/tools/bindings/mojom_tool.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/mojom_list_dart_outputs.py
diff --git a/mojo/public/tools/bindings/mojom_list_dart_outputs.py b/mojo/public/tools/bindings/mojom_list_dart_outputs.py
deleted file mode 100755
index 18f9da64dd47774bf22f3b5b1646fae4e1e9f843..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/mojom_list_dart_outputs.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Generates the list of dart source file outputs from a mojom.Module."""
-
-import argparse
-import os
-import re
-import shutil
-import sys
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-SDK_DIR = os.path.join(SCRIPT_DIR, os.path.pardir, os.path.pardir)
-sys.path.insert(0, os.path.join(SCRIPT_DIR, 'pylib'))
-
-from mojom.error import Error
-from mojom.parse import parser_runner
-from mojom.generate import mojom_translator
-
-def mojom_path(name, namespace, attributes):
- package_name = 'mojom'
- if attributes and attributes.get('DartPackage'):
- package_name = attributes['DartPackage']
- elements = [package_name, 'lib']
- elements.extend(namespace.split('.'))
- elements.append("%s.dart" % name)
- return os.path.join(*elements)
-
-
-def process_mojom(path_to_mojom):
- filename = os.path.abspath(path_to_mojom)
-
- # Parse
- mojom_file_graph = parser_runner.ParseToMojomFileGraph(SDK_DIR, [filename],
- meta_data_only=True)
- if mojom_file_graph is None:
- print("Error parsing %s" % filename)
- mojom_dict = mojom_translator.TranslateFileGraph(mojom_file_graph)
- mojom = mojom_dict[filename]
-
- # Output path
- attributes = mojom.attributes
- print(mojom_path(mojom.name, mojom.namespace, attributes))
-
-
-def main():
- parser = argparse.ArgumentParser(description='Output list of ')
- parser.add_argument('--mojoms',
- metavar='mojoms',
- nargs='+',
- required=True)
- args = parser.parse_args()
-
- for mojom in args.mojoms:
- process_mojom(mojom)
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « mojo/public/tools/bindings/mojom_bindings_generator.py ('k') | mojo/public/tools/bindings/mojom_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698