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

Unified Diff: lib/dom/scripts/idlparser.py

Issue 10692109: Support parsing of constructs like T[]?. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/idlparser.py
diff --git a/lib/dom/scripts/idlparser.py b/lib/dom/scripts/idlparser.py
index 4267e74adda34ef29773713c2fae175417a85572..038acd00f45c4af80b0ee2e42bdbbbac93846178 100755
--- a/lib/dom/scripts/idlparser.py
+++ b/lib/dom/scripts/idlparser.py
@@ -287,12 +287,16 @@ class IDLParser(object):
return re.compile(r'(\[\])+')
def _Type():
- return [OR(AnyType, ObjectType, _NullableType), MAYBE(ArrayModifiers)]
-
- def _NullableType():
- return [OR(_IntegerType, BooleanType, OctetType, FloatType,
- DoubleType, SequenceType, ScopedName),
- MAYBE(Nullable)]
+ return OR(
+ [AnyType, MAYBE([ArrayModifiers, MAYBE(Nullable)])],
podivilov 2012/07/06 15:15:28 Why special case for AnyType?
Anton Muhin 2012/07/06 15:16:44 Per WebIDL spec any is not nullable.
podivilov 2012/07/06 15:24:48 This structure is too big to parse. Please keep _N
+ [
+ OR(
+ _IntegerType, BooleanType, OctetType, FloatType, DoubleType,
+ ObjectType, SequenceType, ScopedName
podivilov 2012/07/06 15:15:28 Why ObjectType became nullable?
Anton Muhin 2012/07/06 15:16:44 I found no references in the spec that it shouldn'
+ ),
+ MAYBE(ArrayModifiers),
+ MAYBE(Nullable),
+ ])
def Nullable():
return '?'
« 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