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

Side by Side Diff: mojo/public/tools/bindings/generators/run_cpp_generator.py

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import ast
7 import os
8 import sys
9
10 script_dir = os.path.dirname(os.path.realpath(__file__))
11 sys.path.insert(0, os.path.join(script_dir, os.pardir, "pylib"))
12
13 from mojom.generate.data
14 import mojom_cpp_generator
15
16 def ReadDict(file):
17 with open(file, 'r') as f:
18 s = f.read()
19 dict = ast.literal_eval(s)
20 return dict
21
22 dict = ReadDict(sys.argv[1])
23 module = mojom.generate.data.ModuleFromData(dict)
24 dir = None
25 if len(sys.argv) > 2:
26 dir = sys.argv[2]
27 cpp = mojom_cpp_generator.Generator(module, ".", dir)
28 cpp.GenerateFiles([])
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl ('k') | mojo/public/tools/bindings/mojom.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698