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

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

Issue 1811413002: [Extensions] Update generated code to support move operations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 4 years, 9 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
« no previous file with comments | « tools/json_schema_compiler/h_generator.py ('k') | tools/json_schema_compiler/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
503 elif node.name == 'deprecated': 505 elif node.name == 'deprecated':
504 deprecated = str(node.value) 506 deprecated = str(node.value)
505 elif node.name == 'documentation_title': 507 elif node.name == 'documentation_title':
506 documentation_options['title'] = node.value 508 documentation_options['title'] = node.value
507 elif node.name == 'documentation_namespace': 509 elif node.name == 'documentation_namespace':
508 documentation_options['namespace'] = node.value 510 documentation_options['namespace'] = node.value
509 elif node.name == 'documented_in': 511 elif node.name == 'documented_in':
510 documentation_options['documented_in'] = node.value 512 documentation_options['documented_in'] = node.value
511 else: 513 else:
512 continue 514 continue
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 print json.dumps(schema, indent=2) 553 print json.dumps(schema, indent=2)
552 else: 554 else:
553 contents = sys.stdin.read() 555 contents = sys.stdin.read()
554 idl = idl_parser.IDLParser().ParseData(contents, '<stdin>') 556 idl = idl_parser.IDLParser().ParseData(contents, '<stdin>')
555 schema = IDLSchema(idl).process() 557 schema = IDLSchema(idl).process()
556 print json.dumps(schema, indent=2) 558 print json.dumps(schema, indent=2)
557 559
558 560
559 if __name__ == '__main__': 561 if __name__ == '__main__':
560 Main() 562 Main()
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/h_generator.py ('k') | tools/json_schema_compiler/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698