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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/blink_idl_parser.py

Issue 2347803002: Drop empty [] for dictionaries and interfaces in IDL files (Closed)
Patch Set: fix p_ExtendedAttributeList Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/bindings/tests/idls/core/SVGTestInterface.idl » ('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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 # [NotEnumerable] DOMString toString(); 257 # [NotEnumerable] DOMString toString();
258 # Limited form of Operation to prevent others from being added. 258 # Limited form of Operation to prevent others from being added.
259 # FIXME: Should be a stringifier instead. 259 # FIXME: Should be a stringifier instead.
260 p[0] = self.BuildNamed('ExceptionOperation', p, 2, p[1]) 260 p[0] = self.BuildNamed('ExceptionOperation', p, 2, p[1])
261 261
262 # Extended attributes 262 # Extended attributes
263 # [b49] Override base parser: remove comment field, since comments stripped 263 # [b49] Override base parser: remove comment field, since comments stripped
264 # FIXME: Upstream 264 # FIXME: Upstream
265 def p_ExtendedAttributeList(self, p): 265 def p_ExtendedAttributeList(self, p):
266 """ExtendedAttributeList : '[' ExtendedAttribute ExtendedAttributes ']' 266 """ExtendedAttributeList : '[' ExtendedAttribute ExtendedAttributes ']'
267 | '[' ']'
268 | """ 267 | """
269 if len(p) > 3: 268 if len(p) > 3:
270 items = ListFromConcat(p[2], p[3]) 269 items = ListFromConcat(p[2], p[3])
271 p[0] = self.BuildProduction('ExtAttributes', p, 1, items) 270 p[0] = self.BuildProduction('ExtAttributes', p, 1, items)
272 271
273 # Error handling for ExtendedAttributeList. 272 # Error handling for ExtendedAttributeList.
274 # We can't upstream this because we override ExtendedAttributeList. 273 # We can't upstream this because we override ExtendedAttributeList.
275 def p_ExtendedAttributeListError(self, p): 274 def p_ExtendedAttributeListError(self, p):
276 """ExtendedAttributeList : '[' ExtendedAttribute ',' error""" 275 """ExtendedAttributeList : '[' ExtendedAttribute ',' error"""
277 p[0] = self.BuildError(p, "ExtendedAttributeList") 276 p[0] = self.BuildError(p, "ExtendedAttributeList")
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 return 1 397 return 1
399 blink_idl_lexer.main(argv) 398 blink_idl_lexer.main(argv)
400 # Important: rewrite_tables=True causes the cache file to be deleted if it 399 # Important: rewrite_tables=True causes the cache file to be deleted if it
401 # exists, thus making sure that PLY doesn't load it instead of regenerating 400 # exists, thus making sure that PLY doesn't load it instead of regenerating
402 # the parse table. 401 # the parse table.
403 parser = BlinkIDLParser(outputdir=outputdir, rewrite_tables=True) 402 parser = BlinkIDLParser(outputdir=outputdir, rewrite_tables=True)
404 403
405 404
406 if __name__ == '__main__': 405 if __name__ == '__main__':
407 sys.exit(main(sys.argv)) 406 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/idls/core/SVGTestInterface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698