Chromium Code Reviews| Index: lib/dom/scripts/idlparser.py |
| diff --git a/lib/dom/scripts/idlparser.py b/lib/dom/scripts/idlparser.py |
| index c2470c077aacab48ab9ed6544d3a066e5763e371..bb8cf5e223f7b82062a9dd7f8052359b9ca73170 100755 |
| --- a/lib/dom/scripts/idlparser.py |
| +++ b/lib/dom/scripts/idlparser.py |
| @@ -283,12 +283,15 @@ class IDLParser(object): |
| def InterfaceType(): |
| return ScopedName |
| + def ArrayModifiers(): |
| + return re.compile('\[\]+') |
|
sra1
2012/06/19 20:09:40
I think this recognizes [] []] []]] etc
Make the r
Anton Muhin
2012/06/20 09:45:04
Done, thanks for spotting this, getting rusty w/ r
|
| + |
| def _Type(): |
| - return OR(AnyArrayType, AnyType, ObjectType, _NullableType) |
| + return [OR(AnyType, ObjectType, _NullableType), MAYBE(ArrayModifiers)] |
| def _NullableType(): |
| return [OR(_IntegerType, BooleanType, OctetType, FloatType, |
| - DoubleType, SequenceType, DOMStringArrayType, ScopedName), |
| + DoubleType, SequenceType, ScopedName), |
| MAYBE(Nullable)] |
| def Nullable(): |
| @@ -300,10 +303,6 @@ class IDLParser(object): |
| def AnyType(): |
| return 'any' |
| - def AnyArrayType(): |
| - # TODO(sra): Do more general handling of array types. |
| - return 'any[]' |
| - |
| def ObjectType(): |
| return re.compile(r'(object|Object)\b') # both spellings. |
| @@ -350,9 +349,6 @@ class IDLParser(object): |
| def ScopedName(): |
| return re.compile(r'[\w\_\:\.\<\>]+') |
| - def DOMStringArrayType(): |
| - return 'DOMString[]' |
| - |
| # Extended Attributes: |
| def ExtAttrs(): |
| return ['[', MAYBE(MANY(ExtAttr, ',')), ']'] |