| Index: Source/bindings/scripts/deprecated_idl_parser.pm
|
| diff --git a/Source/bindings/scripts/deprecated_idl_parser.pm b/Source/bindings/scripts/deprecated_idl_parser.pm
|
| index 9148d72b4377812fd2e86074816b1ac8ca90e0d2..2affe5e3dbb33b5ce43785ce26ac04113559bbd2 100644
|
| --- a/Source/bindings/scripts/deprecated_idl_parser.pm
|
| +++ b/Source/bindings/scripts/deprecated_idl_parser.pm
|
| @@ -331,30 +331,32 @@ sub typeRemoveNullableSuffix
|
| return $type;
|
| }
|
|
|
| +# Promise is not yet in the Web IDL spec but is going to be speced
|
| +# as primitive types in the future.
|
| my $nextAttribute_1 = '^(attribute|inherit|readonly)$';
|
| my $nextPrimitiveType_1 = '^(int|long|short|unsigned)$';
|
| my $nextPrimitiveType_2 = '^(double|float|unrestricted)$';
|
| -my $nextArgumentList_1 = '^(\(|::|ByteString|DOMString|Date|\[|any|boolean|byte|double|float|in|int|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
|
| +my $nextArgumentList_1 = '^(\(|::|ByteString|DOMString|Promise|Date|\[|any|boolean|byte|double|float|in|int|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
|
| my $nextNonAnyType_1 = '^(boolean|byte|double|float|int|long|octet|short|unrestricted|unsigned)$';
|
| -my $nextInterfaceMember_1 = '^(\(|::|ByteString|DOMString|Date|any|attribute|boolean|byte|creator|deleter|double|float|getter|inherit|int|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
|
| +my $nextInterfaceMember_1 = '^(\(|::|ByteString|DOMString|Promise|Date|any|attribute|boolean|byte|creator|deleter|double|float|getter|inherit|int|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
|
| my $nextOptionalIteratorInterfaceOrObject_1 = '^(;|=)$';
|
| my $nextAttributeOrOperationOrIterator_1 = '^(static|stringifier)$';
|
| -my $nextAttributeOrOperationOrIterator_2 = '^(\(|::|ByteString|DOMString|Date|any|boolean|byte|creator|deleter|double|float|getter|int|legacycaller|long|object|octet|sequence|setter|short|unrestricted|unsigned|void)$';
|
| +my $nextAttributeOrOperationOrIterator_2 = '^(\(|::|ByteString|DOMString|Promise|Date|any|boolean|byte|creator|deleter|double|float|getter|int|legacycaller|long|object|octet|sequence|setter|short|unrestricted|unsigned|void)$';
|
| my $nextUnrestrictedFloatType_1 = '^(double|float)$';
|
| my $nextExtendedAttributeRest3_1 = '^(\,|::|\])$';
|
| -my $nextExceptionField_1 = '^(\(|::|ByteString|DOMString|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$';
|
| -my $nextType_1 = '^(::|ByteString|DOMString|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$';
|
| +my $nextExceptionField_1 = '^(\(|::|ByteString|DOMString|Promise|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$';
|
| +my $nextType_1 = '^(::|ByteString|DOMString|Promise|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$';
|
| my $nextSpecials_1 = '^(creator|deleter|getter|legacycaller|setter)$';
|
| my $nextDefinitions_1 = '^(::|callback|dictionary|enum|exception|interface|partial|typedef)$';
|
| -my $nextExceptionMembers_1 = '^(\(|::|ByteString|DOMString|Date|\[|any|boolean|byte|const|double|float|int|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
|
| +my $nextExceptionMembers_1 = '^(\(|::|ByteString|DOMString|Promise|Date|\[|any|boolean|byte|const|double|float|int|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
|
| my $nextAttributeRest_1 = '^(attribute|readonly)$';
|
| -my $nextInterfaceMembers_1 = '^(\(|::|ByteString|DOMString|Date|any|attribute|boolean|byte|const|creator|deleter|double|float|getter|inherit|int|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
|
| -my $nextSingleType_1 = '^(::|ByteString|DOMString|Date|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$';
|
| +my $nextInterfaceMembers_1 = '^(\(|::|ByteString|DOMString|Promise|Date|any|attribute|boolean|byte|const|creator|deleter|double|float|getter|inherit|int|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
|
| +my $nextSingleType_1 = '^(::|ByteString|DOMString|Promise|Date|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned)$';
|
| my $nextArgumentName_1 = '^(attribute|callback|const|creator|deleter|dictionary|enum|exception|getter|implements|inherit|interface|legacycaller|partial|serializer|setter|static|stringifier|typedef|unrestricted)$';
|
| my $nextConstValue_1 = '^(false|true)$';
|
| my $nextConstValue_2 = '^(-|Infinity|NaN)$';
|
| my $nextDefinition_1 = '^(callback|interface)$';
|
| -my $nextAttributeOrOperationRest_1 = '^(\(|::|ByteString|DOMString|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned|void)$';
|
| +my $nextAttributeOrOperationRest_1 = '^(\(|::|ByteString|DOMString|Promise|Date|any|boolean|byte|double|float|int|long|object|octet|sequence|short|unrestricted|unsigned|void)$';
|
| my $nextUnsignedIntegerType_1 = '^(int|long|short)$';
|
| my $nextDefaultValue_1 = '^(-|Infinity|NaN|false|null|true)$';
|
|
|
| @@ -1862,6 +1864,10 @@ sub parseNonAnyType
|
| $self->assertTokenValue($self->getToken(), "DOMString", __LINE__);
|
| return "DOMString" . $self->parseTypeSuffix();
|
| }
|
| + if ($next->value() eq "Promise") {
|
| + $self->assertTokenValue($self->getToken(), "Promise", __LINE__);
|
| + return "Promise" . $self->parseTypeSuffix();
|
| + }
|
| if ($next->value() eq "sequence") {
|
| $self->assertTokenValue($self->getToken(), "sequence", __LINE__);
|
| $self->assertTokenValue($self->getToken(), "<", __LINE__);
|
|
|