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

Side by Side Diff: client/dom/scripts/idlparser.py

Issue 9624004: Allow any order for ExtAttrs and const in WebKit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressing Stephen's comments Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import re 6 import re
7 import subprocess 7 import subprocess
8 import tempfile 8 import tempfile
9 9
10 from pegparser import * 10 from pegparser import *
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 def ImplStmtImplemented(): 138 def ImplStmtImplemented():
139 return ScopedName 139 return ScopedName
140 140
141 # Constants: 141 # Constants:
142 def Const(): 142 def Const():
143 return syntax_switch( 143 return syntax_switch(
144 # Web IDL: 144 # Web IDL:
145 [MAYBE(ExtAttrs), 'const', Type, Id, '=', ConstExpr, ';'], 145 [MAYBE(ExtAttrs), 'const', Type, Id, '=', ConstExpr, ';'],
146 # WebKit: 146 # WebKit:
147 ['const', MAYBE(ExtAttrs), Type, Id, '=', ConstExpr, ';'], 147 [OR(['const', MAYBE(ExtAttrs)], [MAYBE(ExtAttrs), 'const']),
148 Type, Id, '=', ConstExpr, ';'],
148 # FremontCut: 149 # FremontCut:
149 [MAYBE(_Annotations), MAYBE(ExtAttrs), 'const', Type, Id, '=', 150 [MAYBE(_Annotations), MAYBE(ExtAttrs), 'const', Type, Id, '=',
150 ConstExpr, ';']) 151 ConstExpr, ';'])
151 152
152 def ConstExpr(): 153 def ConstExpr():
153 return OR(_BooleanLiteral, 154 return OR(_BooleanLiteral,
154 _IntegerLiteral, 155 _IntegerLiteral,
155 _FloatLiteral) 156 _FloatLiteral)
156 157
157 def _BooleanLiteral(): 158 def _BooleanLiteral():
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 Args: 434 Args:
434 content -- text to parse. 435 content -- text to parse.
435 defines -- an array of pre-processor defines. 436 defines -- an array of pre-processor defines.
436 includePaths -- an array of path strings used by the 437 includePaths -- an array of path strings used by the
437 gcc pre-processor. 438 gcc pre-processor.
438 """ 439 """
439 if self._syntax == WEBKIT_SYNTAX: 440 if self._syntax == WEBKIT_SYNTAX:
440 content = self._pre_process(content, defines, includePaths) 441 content = self._pre_process(content, defines, includePaths)
441 442
442 return self._pegparser.parse(content) 443 return self._pegparser.parse(content)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698