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

Side by Side Diff: tools/json_schema_compiler/idl_schema.py

Issue 1853573002: [Extensions] Remove 'use_movable_types' from code generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 import itertools 6 import itertools
7 import json 7 import json
8 import os.path 8 import os.path
9 import pprint 9 import pprint
10 import re 10 import re
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 if node.name == 'nodoc': 493 if node.name == 'nodoc':
494 nodoc = bool(node.value) 494 nodoc = bool(node.value)
495 elif node.name == 'internal': 495 elif node.name == 'internal':
496 internal = bool(node.value) 496 internal = bool(node.value)
497 elif node.name == 'platforms': 497 elif node.name == 'platforms':
498 platforms = list(node.value) 498 platforms = list(node.value)
499 elif node.name == 'implemented_in': 499 elif node.name == 'implemented_in':
500 compiler_options['implemented_in'] = node.value 500 compiler_options['implemented_in'] = node.value
501 elif node.name == 'camel_case_enum_to_string': 501 elif node.name == 'camel_case_enum_to_string':
502 compiler_options['camel_case_enum_to_string'] = node.value 502 compiler_options['camel_case_enum_to_string'] = node.value
503 elif node.name == 'use_movable_types':
504 compiler_options['use_movable_types'] = node.value
505 elif node.name == 'deprecated': 503 elif node.name == 'deprecated':
506 deprecated = str(node.value) 504 deprecated = str(node.value)
507 elif node.name == 'documentation_title': 505 elif node.name == 'documentation_title':
508 documentation_options['title'] = node.value 506 documentation_options['title'] = node.value
509 elif node.name == 'documentation_namespace': 507 elif node.name == 'documentation_namespace':
510 documentation_options['namespace'] = node.value 508 documentation_options['namespace'] = node.value
511 elif node.name == 'documented_in': 509 elif node.name == 'documented_in':
512 documentation_options['documented_in'] = node.value 510 documentation_options['documented_in'] = node.value
513 else: 511 else:
514 continue 512 continue
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 print json.dumps(schema, indent=2) 551 print json.dumps(schema, indent=2)
554 else: 552 else:
555 contents = sys.stdin.read() 553 contents = sys.stdin.read()
556 idl = idl_parser.IDLParser().ParseData(contents, '<stdin>') 554 idl = idl_parser.IDLParser().ParseData(contents, '<stdin>')
557 schema = IDLSchema(idl).process() 555 schema = IDLSchema(idl).process()
558 print json.dumps(schema, indent=2) 556 print json.dumps(schema, indent=2)
559 557
560 558
561 if __name__ == '__main__': 559 if __name__ == '__main__':
562 Main() 560 Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698