Index: tools/idl_parser/idl_parser.py |
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py |
index a19785bfb1b54792ab99cd2fdfad7d25aaabb726..a39d6bce9223354b5ccb3b8100d8444c8d60e383 100755 |
--- a/tools/idl_parser/idl_parser.py |
+++ b/tools/idl_parser/idl_parser.py |
@@ -729,6 +729,7 @@ class IDLParser(object): |
# both cases. |
def p_NonAnyType(self, p): |
"""NonAnyType : PrimitiveType TypeSuffix |
+ | PromiseType Null |
| identifier TypeSuffix |
| SEQUENCE '<' Type '>' Null""" |
if len(p) == 3: |
@@ -901,6 +902,20 @@ class IDLParser(object): |
# [96] NOT IMPLEMENTED (ExtendedAttributeTypePair) |
+ # [97] |
Jens Widell
2014/10/15 07:22:17
Supposed to be [87]. Looks like a lot of these pro
noelallen1
2014/10/15 18:12:32
Agreed to both. If you change to a different vers
yhirano
2014/10/16 05:25:47
Done. I removed numbers from idl_ppapi_parser.py,
|
+ def p_PromiseType(self, p): |
+ """PromiseType : PROMISE '<' ReturnType '>' |
+ | PROMISE""" |
+ if len(p) == 2: |
+ # Promise without resolution type is not specified in the Web IDL spec. |
+ # As it is used in some specs and in the blink implementation, |
+ # we allow that here. |
+ type = self.BuildAttribute('ResolutionType', |
+ self.BuildProduction('Any', p, 1)) |
+ else: |
+ type = self.BuildAttribute('ResolutionType', p[3]) |
+ p[0] = self.BuildNamed('Promise', p, 1, type) |
+ |
# |
# Parser Errors |
# |