Chromium Code Reviews| 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 '?' |