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

Side by Side Diff: Source/bindings/scripts/unstable/idl_reader.py

Issue 179423002: Use a class for CodeGeneratorV8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweaks Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 18 matching lines...) Expand all
29 """Read an IDL file or complete IDL interface, producing an IdlDefinitions objec t.""" 29 """Read an IDL file or complete IDL interface, producing an IdlDefinitions objec t."""
30 30
31 import os.path 31 import os.path
32 32
33 import blink_idl_parser 33 import blink_idl_parser
34 import idl_definitions_builder 34 import idl_definitions_builder
35 import idl_validator 35 import idl_validator
36 import interface_dependency_resolver 36 import interface_dependency_resolver
37 37
38 38
39 class IdlReader: 39 class IdlReader(object):
40 def __init__(self, interfaces_info=None, idl_attributes_filename=None, outpu tdir=''): 40 def __init__(self, interfaces_info=None, idl_attributes_filename=None, outpu tdir=''):
41 if idl_attributes_filename: 41 if idl_attributes_filename:
42 self.extended_attribute_validator = idl_validator.IDLExtendedAttribu teValidator(idl_attributes_filename) 42 self.extended_attribute_validator = idl_validator.IDLExtendedAttribu teValidator(idl_attributes_filename)
43 else: 43 else:
44 self.extended_attribute_validator = None 44 self.extended_attribute_validator = None
45 45
46 if interfaces_info: 46 if interfaces_info:
47 self.interface_dependency_resolver = interface_dependency_resolver.I nterfaceDependencyResolver(interfaces_info, self) 47 self.interface_dependency_resolver = interface_dependency_resolver.I nterfaceDependencyResolver(interfaces_info, self)
48 else: 48 else:
49 self.interface_dependency_resolver = None 49 self.interface_dependency_resolver = None
(...skipping 23 matching lines...) Expand all
73 except idl_validator.IDLInvalidExtendedAttributeError as error: 73 except idl_validator.IDLInvalidExtendedAttributeError as error:
74 raise idl_validator.IDLInvalidExtendedAttributeError("""IDL ATTRIBUT E ERROR in file %s: 74 raise idl_validator.IDLInvalidExtendedAttributeError("""IDL ATTRIBUT E ERROR in file %s:
75 %s 75 %s
76 If you want to add a new IDL extended attribute, please add it to 76 If you want to add a new IDL extended attribute, please add it to
77 bindings/IDLExtendedAttributes.txt 77 bindings/IDLExtendedAttributes.txt
78 and add an explanation to the Blink IDL documentation at: 78 and add an explanation to the Blink IDL documentation at:
79 http://www.chromium.org/blink/webidl/blink-idl-extended-attributes 79 http://www.chromium.org/blink/webidl/blink-idl-extended-attributes
80 """ % (idl_filename, str(error))) 80 """ % (idl_filename, str(error)))
81 81
82 return definitions 82 return definitions
OLDNEW
« no previous file with comments | « Source/bindings/scripts/unstable/idl_definitions.py ('k') | Source/bindings/scripts/unstable/interface_dependency_resolver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698