<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204412] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204412">204412</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-08-12 09:51:04 -0700 (Fri, 12 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/204404">r204404</a>.
https://bugs.webkit.org/show_bug.cgi?id=160805
"Broke the build for some Apple Internal projects" (Requested
by bradee-oh on #webkit).
Reverted changeset:
"Support WebIDL unions (Part 1)"
https://bugs.webkit.org/show_bug.cgi?id=160769
http://trac.webkit.org/changeset/204404</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLParserpm">trunk/Source/WebCore/bindings/scripts/IDLParser.pm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204411 => 204412)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-12 15:55:10 UTC (rev 204411)
+++ trunk/Source/WebCore/ChangeLog        2016-08-12 16:51:04 UTC (rev 204412)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-08-12 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r204404.
+ https://bugs.webkit.org/show_bug.cgi?id=160805
+
+ "Broke the build for some Apple Internal projects" (Requested
+ by bradee-oh on #webkit).
+
+ Reverted changeset:
+
+ "Support WebIDL unions (Part 1)"
+ https://bugs.webkit.org/show_bug.cgi?id=160769
+ http://trac.webkit.org/changeset/204404
+
</ins><span class="cx"> 2016-08-12 Philippe Normand <pnormand@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GStreamer] Performance problems with bigger video resolution in the webrtc media player
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLParserpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (204411 => 204412)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-08-12 15:55:10 UTC (rev 204411)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-08-12 16:51:04 UTC (rev 204412)
</span><span class="lines">@@ -23,9 +23,6 @@
</span><span class="cx">
</span><span class="cx"> use strict;
</span><span class="cx">
</span><del>-use Carp qw<longmess>;
-use Data::Dumper;
-
</del><span class="cx"> use preprocessor;
</span><span class="cx"> use Class::Struct;
</span><span class="cx">
</span><span class="lines">@@ -77,24 +74,17 @@
</span><span class="cx"> signature => '$', # Attribute signature
</span><span class="cx"> });
</span><span class="cx">
</span><del>-struct( domType => {
- name => '$', # Type identifier
- isNullable => '$', # Is the type Nullable (T?)
- isUnion => '$', # Is the type a union (T or U)
- subtypes => '@', # Array of subtypes, only valid if isUnion or sequence
-});
-
</del><span class="cx"> # Used to represent a map of 'variable name' <-> 'variable type'
</span><span class="cx"> struct( domSignature => {
</span><del>- direction => '$', # Variable direction (in or out)
- name => '$', # Variable name
- type => '$' , # Variable type
- specials => '@', # Specials
</del><ins>+ direction => '$', # Variable direction (in or out)
+ name => '$', # Variable name
+ type => '$', # Variable type
+ specials => '@', # Specials
</ins><span class="cx"> extendedAttributes => '$', # Extended attributes
</span><del>- isNullable => '$', # Is variable type Nullable (T?)
- isVariadic => '$', # Is variable variadic (long... numbers)
- isOptional => '$', # Is variable optional (optional T)
- default => '$', # Default value for parameters
</del><ins>+ isNullable => '$', # Is variable type Nullable (T?)
+ isVariadic => '$', # Is variable variadic (long... numbers)
+ isOptional => '$', # Is variable optional (optional T)
+ default => '$', # Default value for parameters
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> # Used to represent Iterable interfaces
</span><span class="lines">@@ -106,11 +96,12 @@
</span><span class="cx"> extendedAttributes => '$', # Extended attributes
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> # Used to represent string constants
</span><span class="cx"> struct( domConstant => {
</span><del>- name => '$', # DOM Constant identifier
- type => '$', # Type of data
- value => '$', # Constant value
</del><ins>+ name => '$', # DOM Constant identifier
+ type => '$', # Type of data
+ value => '$', # Constant value
</ins><span class="cx"> extendedAttributes => '$', # Extended attributes
</span><span class="cx"> });
</span><span class="cx">
</span><span class="lines">@@ -158,16 +149,6 @@
</span><span class="cx"> return bless $self, $class;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub assert
-{
- my $message = shift;
-
- my $mess = longmess();
- print Dumper($mess);
-
- die $message;
-}
-
</del><span class="cx"> sub assertTokenValue
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="lines">@@ -174,12 +155,11 @@
</span><span class="cx"> my $token = shift;
</span><span class="cx"> my $value = shift;
</span><span class="cx"> my $line = shift;
</span><del>- my $msg = "Next token should be " . $value . ", but " . $token->value() . " on line " . $self->{Line};
</del><ins>+ my $msg = "Next token should be " . $value . ", but " . $token->value() . " at " . $self->{Line};
</ins><span class="cx"> if (defined ($line)) {
</span><span class="cx"> $msg .= " IDLParser.pm:" . $line;
</span><span class="cx"> }
</span><del>-
- assert $msg unless $token->value() eq $value;
</del><ins>+ die $msg unless $token->value() eq $value;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub assertTokenType
</span><span class="lines">@@ -187,8 +167,7 @@
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $token = shift;
</span><span class="cx"> my $type = shift;
</span><del>-
- assert "Next token's type should be " . $type . ", but " . $token->type() . " on line " . $self->{Line} unless $token->type() eq $type;
</del><ins>+ die "Next token's type should be " . $type . ", but " . $token->type() . " at " . $self->{Line} unless $token->type() eq $type;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub assertUnexpectedToken
</span><span class="lines">@@ -196,12 +175,11 @@
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $token = shift;
</span><span class="cx"> my $line = shift;
</span><del>- my $msg = "Unexpected token " . $token . " on line " . $self->{Line};
</del><ins>+ my $msg = "Unexpected token " . $token . " at " . $self->{Line};
</ins><span class="cx"> if (defined ($line)) {
</span><span class="cx"> $msg .= " IDLParser.pm:" . $line;
</span><span class="cx"> }
</span><del>-
- assert $msg;
</del><ins>+ die $msg;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub assertNoExtendedAttributesInTypedef
</span><span class="lines">@@ -210,12 +188,11 @@
</span><span class="cx"> my $name = shift;
</span><span class="cx"> my $line = shift;
</span><span class="cx"> my $typedef = $typedefs{$name};
</span><del>- my $msg = "Unexpected extendedAttributeList in typedef \"$name\" on line " . $self->{Line};
</del><ins>+ my $msg = "Unexpected extendedAttributeList in typedef \"$name\" at " . $self->{Line};
</ins><span class="cx"> if (defined ($line)) {
</span><span class="cx"> $msg .= " IDLParser.pm:" . $line;
</span><span class="cx"> }
</span><del>-
- assert $msg if %{$typedef->extendedAttributes};
</del><ins>+ die $msg if %{$typedef->extendedAttributes};
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub Parse
</span><span class="lines">@@ -239,7 +216,7 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> $self->assertTokenType($next, EmptyToken);
</span><span class="cx"> };
</span><del>- assert $@ . " in $fileName" if $@;
</del><ins>+ die $@ . " in $fileName" if $@;
</ins><span class="cx">
</span><span class="cx"> my $document = idlDocument->new();
</span><span class="cx"> $document->fileName($fileName);
</span><span class="lines">@@ -276,7 +253,7 @@
</span><span class="cx"> my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)';
</span><span class="cx"> my $stringTokenPattern = '^(\"[^\"]*\")';
</span><span class="cx"> my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z]*)';
</span><del>-my $otherTokenPattern = '^(\.\.\.|[^\t\n\r 0-9A-Z_a-z])';
</del><ins>+my $otherTokenPattern = '^(::|\.\.\.|[^\t\n\r 0-9A-Z_a-z])';
</ins><span class="cx">
</span><span class="cx"> sub getTokenInternal
</span><span class="cx"> {
</span><span class="lines">@@ -341,6 +318,21 @@
</span><span class="cx"> die "Failed to parse string (" . $quotedString . ") at " . $self->{Line};
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub typeHasNullableSuffix
+{
+ my $type = shift;
+ return $type ? $type =~ /\?$/ : 0;
+}
+
+sub typeRemoveNullableSuffix
+{
+ my $type = shift;
+ if ($type) {
+ $type =~ s/\?//g;
+ }
+ return $type;
+}
+
</ins><span class="cx"> sub identifierRemoveNullablePrefix
</span><span class="cx"> {
</span><span class="cx"> my $type = shift;
</span><span class="lines">@@ -351,26 +343,26 @@
</span><span class="cx"> my $nextAttribute_1 = '^(attribute|inherit|readonly)$';
</span><span class="cx"> my $nextPrimitiveType_1 = '^(int|long|short|unsigned)$';
</span><span class="cx"> my $nextPrimitiveType_2 = '^(double|float|unrestricted)$';
</span><del>-my $nextArgumentList_1 = '^(\(|ByteString|DOMString|USVString|Date|\[|any|boolean|byte|double|float|in|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
</del><ins>+my $nextArgumentList_1 = '^(\(|::|ByteString|DOMString|USVString|Date|\[|any|boolean|byte|double|float|in|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
</ins><span class="cx"> my $nextNonAnyType_1 = '^(boolean|byte|double|float|long|octet|short|unrestricted|unsigned)$';
</span><del>-my $nextInterfaceMember_1 = '^(\(|ByteString|DOMString|USVString|Date|any|attribute|boolean|byte|creator|deleter|double|float|getter|inherit|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
</del><ins>+my $nextInterfaceMember_1 = '^(\(|::|ByteString|DOMString|USVString|Date|any|attribute|boolean|byte|creator|deleter|double|float|getter|inherit|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
</ins><span class="cx"> my $nextAttributeOrOperation_1 = '^(static|stringifier)$';
</span><del>-my $nextAttributeOrOperation_2 = '^(\(|ByteString|DOMString|USVString|Date|any|boolean|byte|creator|deleter|double|float|getter|legacycaller|long|object|octet|sequence|setter|short|unrestricted|unsigned|void)$';
</del><ins>+my $nextAttributeOrOperation_2 = '^(\(|::|ByteString|DOMString|USVString|Date|any|boolean|byte|creator|deleter|double|float|getter|legacycaller|long|object|octet|sequence|setter|short|unrestricted|unsigned|void)$';
</ins><span class="cx"> my $nextUnrestrictedFloatType_1 = '^(double|float)$';
</span><del>-my $nextExtendedAttributeRest3_1 = '^(\,|\])$';
-my $nextExceptionField_1 = '^(\(|ByteString|DOMString|USVString|Date|any|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned)$';
-my $nextType_1 = '^(ByteString|DOMString|USVString|Date|any|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned)$';
</del><ins>+my $nextExtendedAttributeRest3_1 = '^(\,|::|\])$';
+my $nextExceptionField_1 = '^(\(|::|ByteString|DOMString|USVString|Date|any|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned)$';
+my $nextType_1 = '^(::|ByteString|DOMString|USVString|Date|any|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned)$';
</ins><span class="cx"> my $nextSpecials_1 = '^(creator|deleter|getter|legacycaller|setter)$';
</span><del>-my $nextDefinitions_1 = '^(callback|dictionary|enum|exception|interface|partial|typedef)$';
-my $nextExceptionMembers_1 = '^(\(|ByteString|DOMString|USVString|Date|\[|any|boolean|byte|const|double|float|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
</del><ins>+my $nextDefinitions_1 = '^(::|callback|dictionary|enum|exception|interface|partial|typedef)$';
+my $nextExceptionMembers_1 = '^(\(|::|ByteString|DOMString|USVString|Date|\[|any|boolean|byte|const|double|float|long|object|octet|optional|sequence|short|unrestricted|unsigned)$';
</ins><span class="cx"> my $nextAttributeRest_1 = '^(attribute|readonly)$';
</span><del>-my $nextInterfaceMembers_1 = '^(\(|ByteString|DOMString|USVString|Date|any|attribute|boolean|byte|const|creator|deleter|double|float|getter|inherit|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
-my $nextSingleType_1 = '^(ByteString|DOMString|USVString|Date|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned)$';
</del><ins>+my $nextInterfaceMembers_1 = '^(\(|::|ByteString|DOMString|USVString|Date|any|attribute|boolean|byte|const|creator|deleter|double|float|getter|inherit|legacycaller|long|object|octet|readonly|sequence|serializer|setter|short|static|stringifier|unrestricted|unsigned|void)$';
+my $nextSingleType_1 = '^(::|ByteString|DOMString|USVString|Date|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned)$';
</ins><span class="cx"> my $nextArgumentName_1 = '^(attribute|callback|const|creator|deleter|dictionary|enum|exception|getter|implements|inherit|interface|legacycaller|partial|serializer|setter|static|stringifier|typedef|unrestricted)$';
</span><span class="cx"> my $nextConstValue_1 = '^(false|true)$';
</span><span class="cx"> my $nextConstValue_2 = '^(-|Infinity|NaN)$';
</span><span class="cx"> my $nextDefinition_1 = '^(callback|interface)$';
</span><del>-my $nextAttributeOrOperationRest_1 = '^(\(|ByteString|DOMString|USVString|Date|any|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned|void)$';
</del><ins>+my $nextAttributeOrOperationRest_1 = '^(\(|::|ByteString|DOMString|USVString|Date|any|boolean|byte|double|float|long|object|octet|sequence|short|unrestricted|unsigned|void)$';
</ins><span class="cx"> my $nextUnsignedIntegerType_1 = '^(long|short)$';
</span><span class="cx"> my $nextDefaultValue_1 = '^(-|Infinity|NaN|false|null|true)$';
</span><span class="cx">
</span><span class="lines">@@ -488,7 +480,7 @@
</span><span class="cx"> if ($next->value() eq "typedef") {
</span><span class="cx"> return $self->parseTypedef($extendedAttributeList);
</span><span class="cx"> }
</span><del>- if ($next->type() == IdentifierToken) {
</del><ins>+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
</ins><span class="cx"> return $self->parseImplementsStatement($extendedAttributeList);
</span><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value(), __LINE__);
</span><span class="lines">@@ -695,10 +687,13 @@
</span><span class="cx"> $member->isOptional(0);
</span><span class="cx"> }
</span><span class="cx"> $member->extendedAttributes($extendedAttributeList);
</span><del>-
</del><span class="cx"> my $type = $self->parseType();
</span><del>- $member->type($type->name);
- $member->isNullable($type->isNullable);
</del><ins>+ if (typeHasNullableSuffix($type)) {
+ $member->isNullable(1);
+ } else {
+ $member->isNullable(0);
+ }
+ $member->type(typeRemoveNullableSuffix($type));
</ins><span class="cx">
</span><span class="cx"> my $nameToken = $self->getToken();
</span><span class="cx"> $self->assertTokenType($nameToken, IdentifierToken);
</span><span class="lines">@@ -811,10 +806,9 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq ":") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), ":", __LINE__);
</span><del>- my $name = $self->parseName();
- push(@parent, $name);
-
- # FIXME: Remove. Was needed for needed for ObjC bindings.
</del><ins>+ my $scopedName = $self->parseScopedName();
+ push(@parent, $scopedName);
+ # Multiple inheritance (needed for ObjC bindings).
</ins><span class="cx"> push(@parent, @{$self->parseIdentifiers()});
</span><span class="cx"> }
</span><span class="cx"> return \@parent;
</span><span class="lines">@@ -906,10 +900,7 @@
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "typedef", __LINE__);
</span><span class="cx"> my $typedef = Typedef->new();
</span><span class="cx"> $typedef->extendedAttributes($self->parseExtendedAttributeListAllowEmpty());
</span><del>-
- my $type = $self->parseType();
- $typedef->type($type->name);
-
</del><ins>+ $typedef->type($self->parseType());
</ins><span class="cx"> my $nameToken = $self->getToken();
</span><span class="cx"> $self->assertTokenType($nameToken, IdentifierToken);
</span><span class="cx"> $self->assertTokenValue($self->getToken(), ";", __LINE__);
</span><span class="lines">@@ -928,9 +919,9 @@
</span><span class="cx">
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->type() == IdentifierToken) {
</span><del>- $self->parseName();
</del><ins>+ $self->parseScopedName();
</ins><span class="cx"> $self->assertTokenValue($self->getToken(), "implements", __LINE__);
</span><del>- $self->parseName();
</del><ins>+ $self->parseScopedName();
</ins><span class="cx"> $self->assertTokenValue($self->getToken(), ";", __LINE__);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -946,10 +937,7 @@
</span><span class="cx"> if ($next->value() eq "const") {
</span><span class="cx"> my $newDataNode = domConstant->new();
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "const", __LINE__);
</span><del>-
- my $type = $self->parseConstType();
- $newDataNode->type($type->name);
-
</del><ins>+ $newDataNode->type($self->parseConstType());
</ins><span class="cx"> my $constNameToken = $self->getToken();
</span><span class="cx"> $self->assertTokenType($constNameToken, IdentifierToken);
</span><span class="cx"> $newDataNode->name(identifierRemoveNullablePrefix($constNameToken->value()));
</span><span class="lines">@@ -1197,8 +1185,12 @@
</span><span class="cx"> my $returnType = $self->parseReturnType();
</span><span class="cx"> my $interface = $self->parseOperationRest($extendedAttributeList);
</span><span class="cx"> if (defined ($interface)) {
</span><del>- $interface->signature->type($returnType->name);
- $interface->signature->isNullable($returnType->isNullable);
</del><ins>+ if (typeHasNullableSuffix($returnType)) {
+ $interface->signature->isNullable(1);
+ } else {
+ $interface->signature->isNullable(0);
+ }
+ $interface->signature->type(typeRemoveNullableSuffix($returnType));
</ins><span class="cx"> }
</span><span class="cx"> return $interface;
</span><span class="cx"> }
</span><span class="lines">@@ -1234,11 +1226,14 @@
</span><span class="cx"> }
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "attribute", __LINE__);
</span><span class="cx"> $newDataNode->signature(domSignature->new());
</span><del>-
</del><span class="cx"> my $type = $self->parseType();
</span><del>- $newDataNode->signature->type($type->name);
- $newDataNode->signature->isNullable($type->isNullable);
-
</del><ins>+ if (typeHasNullableSuffix($type)) {
+ $newDataNode->signature->isNullable(1);
+ } else {
+ $newDataNode->signature->isNullable(0);
+ }
+ # Remove all "?" in the type declaration, e.g. "double?" -> "double".
+ $newDataNode->signature->type(typeRemoveNullableSuffix($type));
</ins><span class="cx"> my $token = $self->getToken();
</span><span class="cx"> $self->assertTokenType($token, IdentifierToken);
</span><span class="cx"> $newDataNode->signature->name(identifierRemoveNullablePrefix($token->value()));
</span><span class="lines">@@ -1293,8 +1288,12 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->type() == IdentifierToken || $next->value() eq "(") {
</span><span class="cx"> my $operation = $self->parseOperationRest($extendedAttributeList);
</span><del>- $operation->signature->type($returnType->name);
- $operation->signature->isNullable($returnType->isNullable);
</del><ins>+ if (typeHasNullableSuffix($returnType)) {
+ $operation->signature->isNullable(1);
+ } else {
+ $operation->signature->isNullable(0);
+ }
+ $operation->signature->type(typeRemoveNullableSuffix($returnType));
</ins><span class="cx">
</span><span class="cx"> return $operation;
</span><span class="cx"> }
</span><span class="lines">@@ -1314,8 +1313,13 @@
</span><span class="cx"> my $returnType = $self->parseReturnType();
</span><span class="cx"> my $interface = $self->parseOperationRest($extendedAttributeList);
</span><span class="cx"> if (defined ($interface)) {
</span><del>- $interface->signature->type($returnType->name);
- $interface->signature->isNullable($returnType->isNullable);
</del><ins>+ if (typeHasNullableSuffix($returnType)) {
+ $interface->signature->isNullable(1);
+ } else {
+ $interface->signature->isNullable(0);
+ }
+ $interface->signature->type(typeRemoveNullableSuffix($returnType));
+
</ins><span class="cx"> $interface->signature->specials(\@specials);
</span><span class="cx"> }
</span><span class="cx"> return $interface;
</span><span class="lines">@@ -1526,10 +1530,15 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "optional") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "optional", __LINE__);
</span><del>-
</del><span class="cx"> my $type = $self->parseType();
</span><del>- $paramDataNode->type(identifierRemoveNullablePrefix($type->name));
- $paramDataNode->isNullable($type->isNullable);
</del><ins>+ # domDataNode can only consider last "?".
+ if (typeHasNullableSuffix($type)) {
+ $paramDataNode->isNullable(1);
+ } else {
+ $paramDataNode->isNullable(0);
+ }
+ # Remove "?" if exists, e.g. "object?" -> "object".
+ $paramDataNode->type(identifierRemoveNullablePrefix(typeRemoveNullableSuffix($type)));
</ins><span class="cx"> $paramDataNode->isOptional(1);
</span><span class="cx"> $paramDataNode->name($self->parseArgumentName());
</span><span class="cx"> $paramDataNode->default($self->parseDefault());
</span><span class="lines">@@ -1537,8 +1546,14 @@
</span><span class="cx"> }
</span><span class="cx"> if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) {
</span><span class="cx"> my $type = $self->parseType();
</span><del>- $paramDataNode->type($type->name);
- $paramDataNode->isNullable($type->isNullable);
</del><ins>+ # domDataNode can only consider last "?".
+ if (typeHasNullableSuffix($type)) {
+ $paramDataNode->isNullable(1);
+ } else {
+ $paramDataNode->isNullable(0);
+ }
+ # Remove "?" if exists, e.g. "object?" -> "object".
+ $paramDataNode->type(typeRemoveNullableSuffix($type));
</ins><span class="cx"> $paramDataNode->isOptional(0);
</span><span class="cx"> $paramDataNode->isVariadic($self->parseEllipsis());
</span><span class="cx"> $paramDataNode->name($self->parseArgumentName());
</span><span class="lines">@@ -1597,11 +1612,7 @@
</span><span class="cx"> $newDataNode->type("attribute");
</span><span class="cx"> $newDataNode->isReadOnly(1);
</span><span class="cx"> $newDataNode->signature(domSignature->new());
</span><del>-
- my $type = $self->parseType();
- $newDataNode->signature->type($type->name);
- $newDataNode->signature->isNullable($type->isNullable);
-
</del><ins>+ $newDataNode->signature->type($self->parseType());
</ins><span class="cx"> my $token = $self->getToken();
</span><span class="cx"> $self->assertTokenType($token, IdentifierToken);
</span><span class="cx"> $newDataNode->signature->name(identifierRemoveNullablePrefix($token->value()));
</span><span class="lines">@@ -1687,9 +1698,9 @@
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><del>- if ($next->type() == IdentifierToken) {
- my $name = $self->parseName();
- return $self->parseExtendedAttributeRest($name);
</del><ins>+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
+ my $scopedName = $self->parseScopedName();
+ return $self->parseExtendedAttributeRest($scopedName);
</ins><span class="cx"> }
</span><span class="cx"> # backward compatibility. Spec doesn' allow "[]". But WebKit requires.
</span><span class="cx"> if ($next->value() eq ']') {
</span><span class="lines">@@ -1702,9 +1713,9 @@
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><del>- if ($next->type() == IdentifierToken) {
- my $name = $self->parseName();
- return $self->parseExtendedAttributeRest($name);
</del><ins>+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
+ my $scopedName = $self->parseScopedName();
+ return $self->parseExtendedAttributeRest($scopedName);
</ins><span class="cx"> }
</span><span class="cx"> return {};
</span><span class="cx"> }
</span><span class="lines">@@ -1746,9 +1757,9 @@
</span><span class="cx"> $self->assertTokenValue($self->getToken(), ")", __LINE__);
</span><span class="cx"> return @arguments;
</span><span class="cx"> }
</span><del>- if ($next->type() == IdentifierToken) {
- my $name = $self->parseName();
- return $self->parseExtendedAttributeRest3($name);
</del><ins>+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
+ my $scopedName = $self->parseScopedName();
+ return $self->parseExtendedAttributeRest3($scopedName);
</ins><span class="cx"> }
</span><span class="cx"> if ($next->type() == IntegerToken) {
</span><span class="cx"> my $token = $self->getToken();
</span><span class="lines">@@ -1765,12 +1776,12 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "&") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "&", __LINE__);
</span><del>- my $rightValue = $self->parseName();
</del><ins>+ my $rightValue = $self->parseScopedName();
</ins><span class="cx"> return $name . "&" . $rightValue;
</span><span class="cx"> }
</span><span class="cx"> if ($next->value() eq "|") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "|", __LINE__);
</span><del>- my $rightValue = $self->parseName();
</del><ins>+ my $rightValue = $self->parseScopedName();
</ins><span class="cx"> return $name . "|" . $rightValue;
</span><span class="cx"> }
</span><span class="cx"> if ($next->value() eq "(") {
</span><span class="lines">@@ -1781,12 +1792,30 @@
</span><span class="cx"> return $attr;
</span><span class="cx"> }
</span><span class="cx"> if ($next->type() == IdentifierToken || $next->value() =~ /$nextExtendedAttributeRest3_1/) {
</span><del>- $self->parseNameNoComma();
- return $name;
</del><ins>+ my @names = ();
+ push(@names, $name);
+ push(@names, @{$self->parseScopedNameListNoComma()});
+ return join(' ', @names);
</ins><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub parseScopedNameListNoComma
+{
+ my $self = shift;
+ my @names = ();
+
+ while (1) {
+ my $next = $self->nextToken();
+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
+ push(@names, $self->parseScopedName());
+ } else {
+ last;
+ }
+ }
+ return \@names;
+}
+
</ins><span class="cx"> sub parseArgumentNameKeyword
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="lines">@@ -1859,7 +1888,9 @@
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "(") {
</span><del>- return $self->parseUnionType();
</del><ins>+ $self->parseUnionType();
+ $self->parseTypeSuffix();
+ return;
</ins><span class="cx"> }
</span><span class="cx"> if ($next->type() == IdentifierToken || $next->value() =~ /$nextType_1/) {
</span><span class="cx"> return $self->parseSingleType();
</span><span class="lines">@@ -1873,15 +1904,10 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "any") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "any", __LINE__);
</span><del>-
- my $anyType = domType->new();
- $anyType->name("any");
- return $anyType;
</del><ins>+ return "any";
</ins><span class="cx"> }
</span><span class="cx"> if ($next->type() == IdentifierToken || $next->value() =~ /$nextSingleType_1/) {
</span><del>- my $nonAnyType = $self->parseNonAnyType();
- $nonAnyType->isNullable($self->parseNull());
- return $nonAnyType;
</del><ins>+ return $self->parseNonAnyType();
</ins><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value(), __LINE__);
</span><span class="cx"> }
</span><span class="lines">@@ -1890,24 +1916,14 @@
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><del>-
- my $unionType = domType->new();
- $unionType->name("UNION");
- $unionType->isUnion(1);
-
</del><span class="cx"> if ($next->value() eq "(") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "(", __LINE__);
</span><del>-
- push(@{$unionType->subtypes}, $self->parseUnionMemberType());
-
</del><ins>+ $self->parseUnionMemberType();
</ins><span class="cx"> $self->assertTokenValue($self->getToken(), "or", __LINE__);
</span><del>-
- push(@{$unionType->subtypes}, $self->parseUnionMemberType());
- push(@{$unionType->subtypes}, $self->parseUnionMemberTypes());
-
</del><ins>+ $self->parseUnionMemberType();
+ $self->parseUnionMemberTypes();
</ins><span class="cx"> $self->assertTokenValue($self->getToken(), ")", __LINE__);
</span><del>-
- return $unionType;
</del><ins>+ return;
</ins><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value(), __LINE__);
</span><span class="cx"> }
</span><span class="lines">@@ -1917,14 +1933,20 @@
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "(") {
</span><del>- my $unionType = $self->parseUnionType();
- $unionType->isNullable($self->parseNull());
- return $unionType;
</del><ins>+ $self->parseUnionType();
+ $self->parseTypeSuffix();
+ return;
</ins><span class="cx"> }
</span><ins>+ if ($next->value() eq "any") {
+ $self->assertTokenValue($self->getToken(), "any", __LINE__);
+ $self->assertTokenValue($self->getToken(), "[", __LINE__);
+ $self->assertTokenValue($self->getToken(), "]", __LINE__);
+ $self->parseTypeSuffix();
+ return;
+ }
</ins><span class="cx"> if ($next->type() == IdentifierToken || $next->value() =~ /$nextSingleType_1/) {
</span><del>- my $nonAnyType = $self->parseNonAnyType();
- $nonAnyType->isNullable($self->parseNull());
- return $nonAnyType;
</del><ins>+ $self->parseNonAnyType();
+ return;
</ins><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value(), __LINE__);
</span><span class="cx"> }
</span><span class="lines">@@ -1933,16 +1955,11 @@
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><del>-
- my @subtypes = ();
-
</del><span class="cx"> if ($next->value() eq "or") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "or", __LINE__);
</span><del>- push(@subtypes, $self->parseUnionMemberType());
- push(@subtypes, $self->parseUnionMemberTypes());
</del><ins>+ $self->parseUnionMemberType();
+ $self->parseUnionMemberTypes();
</ins><span class="cx"> }
</span><del>-
- return @subtypes;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub parseNonAnyType
</span><span class="lines">@@ -1949,82 +1966,41 @@
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><del>-
- my $type = domType->new();
-
</del><span class="cx"> if ($next->value() =~ /$nextNonAnyType_1/) {
</span><del>- $type->name($self->parsePrimitiveType());
- return $type;
</del><ins>+ return $self->parsePrimitiveType() . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><span class="cx"> if ($next->value() eq "ByteString") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "ByteString", __LINE__);
</span><del>-
- $type->name("ByteString");
- return $type;
</del><ins>+ return "ByteString" . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><span class="cx"> if ($next->value() eq "DOMString") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "DOMString", __LINE__);
</span><del>-
- $type->name("DOMString");
- return $type;
</del><ins>+ return "DOMString" . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><span class="cx"> if ($next->value() eq "USVString") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "USVString", __LINE__);
</span><del>-
- $type->name("USVString");
- return $type;
</del><ins>+ return "USVString" . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><ins>+
+ if ($next->value() eq "sequence") {
+ $self->assertTokenValue($self->getToken(), "sequence", __LINE__);
+ $self->assertTokenValue($self->getToken(), "<", __LINE__);
+ my $type = $self->parseType();
+ $self->assertTokenValue($self->getToken(), ">", __LINE__);
+ return "sequence<" . $type . ">" . $self->parseNull();
+ }
</ins><span class="cx"> if ($next->value() eq "object") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "object", __LINE__);
</span><del>-
- $type->name("object");
- return $type;
</del><ins>+ return "object" . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><del>- if ($next->value() eq "RegExp") {
- $self->assertTokenValue($self->getToken(), "RegExp", __LINE__);
-
- $type->name("RegExp");
- return $type;
- }
- if ($next->value() eq "Error") {
- $self->assertTokenValue($self->getToken(), "Error", __LINE__);
-
- $type->name("Error");
- return $type;
- }
- if ($next->value() eq "DOMException") {
- $self->assertTokenValue($self->getToken(), "DOMException", __LINE__);
-
- $type->name("DOMException");
- return $type;
- }
</del><span class="cx"> if ($next->value() eq "Date") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "Date", __LINE__);
</span><del>-
- $type->name("Date");
- return $type;
</del><ins>+ return "Date" . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><del>- if ($next->value() eq "sequence") {
- $self->assertTokenValue($self->getToken(), "sequence", __LINE__);
- $self->assertTokenValue($self->getToken(), "<", __LINE__);
-
- my $subtype = $self->parseType();
- my $subtypeName = $subtype->name;
-
- $self->assertTokenValue($self->getToken(), ">", __LINE__);
-
- # FIXME: This should just be "sequence" when we start using domTypes in the CodeGenerators
- $type->name("sequence<${subtypeName}>");
- push(@{$type->subtypes}, $subtype);
-
- return $type;
</del><ins>+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
+ my $name = identifierRemoveNullablePrefix($self->parseScopedName());
+ return $name . $self->parseTypeSuffix();
</ins><span class="cx"> }
</span><del>- if ($next->type() == IdentifierToken) {
- my $identifier = $self->getToken();
-
- $type->name(identifierRemoveNullablePrefix($identifier->value()));
- return $type;
- }
</del><span class="cx"> $self->assertUnexpectedToken($next->value(), __LINE__);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2032,21 +2008,12 @@
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><del>-
- my $type = domType->new();
-
</del><span class="cx"> if ($next->value() =~ /$nextNonAnyType_1/) {
</span><del>- $type->name($self->parsePrimitiveType());
- $type->isNullable($self->parseNull());
- return $type;
</del><ins>+ return $self->parsePrimitiveType() . $self->parseNull();
</ins><span class="cx"> }
</span><span class="cx"> if ($next->type() == IdentifierToken) {
</span><del>- my $identifier = $self->getToken();
-
- $type->name($identifier->value());
- $type->isNullable($self->parseNull());
-
- return $type;
</del><ins>+ my $token = $self->getToken();
+ return $token->value() . $self->parseNull();
</ins><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value(), __LINE__);
</span><span class="cx"> }
</span><span class="lines">@@ -2152,6 +2119,17 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub parseTypeSuffix
+{
+ my $self = shift;
+ my $next = $self->nextToken();
+ if ($next->value() eq "?") {
+ $self->assertTokenValue($self->getToken(), "?", __LINE__);
+ return "?";
+ }
+ return "";
+}
+
</ins><span class="cx"> sub parseNull
</span><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="lines">@@ -2158,9 +2136,9 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "?") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "?", __LINE__);
</span><del>- return 1;
</del><ins>+ return "?";
</ins><span class="cx"> }
</span><del>- return 0;
</del><ins>+ return "";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub parseReturnType
</span><span class="lines">@@ -2169,10 +2147,7 @@
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->value() eq "void") {
</span><span class="cx"> $self->assertTokenValue($self->getToken(), "void", __LINE__);
</span><del>-
- my $voidType = domType->new();
- $voidType->name("void");
- return $voidType;
</del><ins>+ return "void";
</ins><span class="cx"> }
</span><span class="cx"> if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) {
</span><span class="cx"> return $self->parseType();
</span><span class="lines">@@ -2200,30 +2175,93 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub parseNameNoComma
</del><ins>+sub parseScopedName
</ins><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><ins>+ if ($next->value() eq "::") {
+ return $self->parseAbsoluteScopedName();
+ }
</ins><span class="cx"> if ($next->type() == IdentifierToken) {
</span><del>- my $identifier = $self->getToken();
- return ($identifier->value());
</del><ins>+ return $self->parseRelativeScopedName();
</ins><span class="cx"> }
</span><ins>+ $self->assertUnexpectedToken($next->value());
+}
</ins><span class="cx">
</span><del>- return ();
</del><ins>+sub parseAbsoluteScopedName
+{
+ my $self = shift;
+ my $next = $self->nextToken();
+ if ($next->value() eq "::") {
+ $self->assertTokenValue($self->getToken(), "::");
+ my $token = $self->getToken();
+ $self->assertTokenType($token, IdentifierToken);
+ return "::" . $token->value() . $self->parseScopedNameParts();
+ }
+ $self->assertUnexpectedToken($next->value());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-sub parseName
</del><ins>+sub parseRelativeScopedName
</ins><span class="cx"> {
</span><span class="cx"> my $self = shift;
</span><span class="cx"> my $next = $self->nextToken();
</span><span class="cx"> if ($next->type() == IdentifierToken) {
</span><del>- my $identifier = $self->getToken();
- return $identifier->value();
</del><ins>+ my $token = $self->getToken();
+ return $token->value() . $self->parseScopedNameParts();
</ins><span class="cx"> }
</span><span class="cx"> $self->assertUnexpectedToken($next->value());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub parseScopedNameParts
+{
+ my $self = shift;
+ my @names = ();
</ins><span class="cx">
</span><ins>+ while (1) {
+ my $next = $self->nextToken();
+ if ($next->value() eq "::") {
+ $self->assertTokenValue($self->getToken(), "::");
+ push(@names, "::");
+ my $token = $self->getToken();
+ $self->assertTokenType($token, IdentifierToken);
+ push(@names, $token->value());
+ } else {
+ last;
+ }
+ }
+ return join("", @names);
+}
+
+sub parseScopedNameList
+{
+ my $self = shift;
+ my $next = $self->nextToken();
+ if ($next->type() == IdentifierToken || $next->value() eq "::") {
+ my @names = ();
+ push(@names, $self->parseScopedName());
+ push(@names, @{$self->parseScopedNames()});
+ return \@names;
+ }
+ $self->assertUnexpectedToken($next->value(), __LINE__);
+}
+
+sub parseScopedNames
+{
+ my $self = shift;
+ my @names = ();
+
+ while (1) {
+ my $next = $self->nextToken();
+ if ($next->value() eq ",") {
+ $self->assertTokenValue($self->getToken(), ",");
+ push(@names, $self->parseScopedName());
+ } else {
+ last;
+ }
+ }
+ return \@names;
+}
+
</ins><span class="cx"> sub applyMemberList
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span></span></pre>
</div>
</div>
</body>
</html>