OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Translate parse tree to Mojom IR""" | 6 """Translate parse tree to Mojom IR""" |
7 | 7 |
8 | 8 |
9 import os | 9 import os |
10 import sys | 10 import sys |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 print("usage: %s filename" % (sys.argv[0])) | 121 print("usage: %s filename" % (sys.argv[0])) |
122 sys.exit(1) | 122 sys.exit(1) |
123 tree = eval(open(sys.argv[1]).read()) | 123 tree = eval(open(sys.argv[1]).read()) |
124 name = os.path.splitext(os.path.basename(sys.argv[1]))[0] | 124 name = os.path.splitext(os.path.basename(sys.argv[1]))[0] |
125 result = Translate(tree, name) | 125 result = Translate(tree, name) |
126 print(result) | 126 print(result) |
127 | 127 |
128 | 128 |
129 if __name__ == '__main__': | 129 if __name__ == '__main__': |
130 Main() | 130 Main() |
OLD | NEW |