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

Side by Side Diff: sky/engine/bindings2/scripts/idl_validator.py

Issue 914413004: Add a new bindings2/scripts directory for Dart bindings (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove idlrenderer.py it's not used Created 5 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
« no previous file with comments | « sky/engine/bindings2/scripts/idl_types.py ('k') | sky/engine/bindings2/scripts/idlnode.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 30
31 Design doc: http://www.chromium.org/developers/design-documents/idl-compiler#TOC -Extended-attribute-validation 31 Design doc: http://www.chromium.org/developers/design-documents/idl-compiler#TOC -Extended-attribute-validation
32 """ 32 """
33 33
34 34
35 import os.path 35 import os.path
36 import re 36 import re
37 37
38 module_path = os.path.dirname(__file__) 38 module_path = os.path.dirname(__file__)
39 source_path = os.path.join(module_path, os.pardir, os.pardir) 39 source_path = os.path.join(module_path, os.pardir, os.pardir)
40 EXTENDED_ATTRIBUTES_RELATIVE_PATH = os.path.join('bindings', 40 EXTENDED_ATTRIBUTES_RELATIVE_PATH = os.path.join('bindings2',
41 'IDLExtendedAttributes.txt') 41 'IDLExtendedAttributes.txt')
42 EXTENDED_ATTRIBUTES_FILENAME = os.path.join(source_path, 42 EXTENDED_ATTRIBUTES_FILENAME = os.path.join(source_path,
43 EXTENDED_ATTRIBUTES_RELATIVE_PATH) 43 EXTENDED_ATTRIBUTES_RELATIVE_PATH)
44 44
45 class IDLInvalidExtendedAttributeError(Exception): 45 class IDLInvalidExtendedAttributeError(Exception):
46 pass 46 pass
47 47
48 48
49 class IDLExtendedAttributeValidator(object): 49 class IDLExtendedAttributeValidator(object):
50 def __init__(self): 50 def __init__(self):
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 yield name, value_list 101 yield name, value_list
102 102
103 valid_extended_attributes = {} 103 valid_extended_attributes = {}
104 for name, value_list in extended_attribute_name_values(): 104 for name, value_list in extended_attribute_name_values():
105 if not value_list: 105 if not value_list:
106 valid_extended_attributes[name] = set([None]) 106 valid_extended_attributes[name] = set([None])
107 continue 107 continue
108 valid_extended_attributes[name] = set([value if value else None 108 valid_extended_attributes[name] = set([value if value else None
109 for value in value_list]) 109 for value in value_list])
110 return valid_extended_attributes 110 return valid_extended_attributes
OLDNEW
« no previous file with comments | « sky/engine/bindings2/scripts/idl_types.py ('k') | sky/engine/bindings2/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698