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.
10 script_dir
= os
.path
.dirname(os
.path
.realpath(__file__
))
11 sys
.path
.insert(0, os
.path
.join(script_dir
, os
.pardir
, "pylib"))
13 from mojom
.generate
.data
14 import mojom_cpp_generator
17 with
open(file, 'r') as f
:
19 dict = ast
.literal_eval(s
)
22 dict = ReadDict(sys
.argv
[1])
23 module
= mojom
.generate
.data
.ModuleFromData(dict)
27 cpp
= mojom_cpp_generator
.Generator(module
, ".", dir)