Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: Source/bindings/scripts/idl_parser.pm

Issue 127903002: Empty reflected attributes and string literals in extended attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Allow string literals for extended attributes Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # KDOM IDL parser 2 # KDOM IDL parser
3 # 3 #
4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org>
5 # 5 #
6 # This library is free software; you can redistribute it and/or 6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public 7 # modify it under the terms of the GNU Library General Public
8 # License as published by the Free Software Foundation; either 8 # License as published by the Free Software Foundation; either
9 # version 2 of the License, or (at your option) any later version. 9 # version 2 of the License, or (at your option) any later version.
10 # 10 #
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 my $self = shift; 1613 my $self = shift;
1614 my $next = $self->nextToken(); 1614 my $next = $self->nextToken();
1615 if ($next->type() == IdentifierToken || $next->value() eq "::") { 1615 if ($next->type() == IdentifierToken || $next->value() eq "::") {
1616 my $scopedName = $self->parseScopedName(); 1616 my $scopedName = $self->parseScopedName();
1617 return $self->parseExtendedAttributeRest3($scopedName); 1617 return $self->parseExtendedAttributeRest3($scopedName);
1618 } 1618 }
1619 if ($next->type() == IntegerToken) { 1619 if ($next->type() == IntegerToken) {
1620 my $token = $self->getToken(); 1620 my $token = $self->getToken();
1621 return $token->value(); 1621 return $token->value();
1622 } 1622 }
1623 if ($next->type() == StringToken) {
haraken 2014/01/09 10:19:05 Would you add a comment that this is a syntax exte
sof 2014/01/09 11:13:17 certainly; added. I also added productions to the
1624 my $token = $self->getToken();
1625 return $self->parseExtendedAttributeRest3($self->unquoteString($token->v alue()));
1626 }
1623 $self->assertUnexpectedToken($next->value(), __LINE__); 1627 $self->assertUnexpectedToken($next->value(), __LINE__);
1624 } 1628 }
1625 1629
1626 sub parseExtendedAttributeRest3 1630 sub parseExtendedAttributeRest3
1627 { 1631 {
1628 my $self = shift; 1632 my $self = shift;
1629 my $name = shift; 1633 my $name = shift;
1630 1634
1631 my $next = $self->nextToken(); 1635 my $next = $self->nextToken();
1632 if ($next->value() eq "&") { 1636 if ($next->value() eq "&") {
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 $customConstructor->overloadedIndex($index++); 2215 $customConstructor->overloadedIndex($index++);
2212 push(@{$interface->customConstructors}, $customConstructor); 2216 push(@{$interface->customConstructors}, $customConstructor);
2213 } 2217 }
2214 delete $extendedAttributeList->{"CustomConstructors"}; 2218 delete $extendedAttributeList->{"CustomConstructors"};
2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; 2219 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING";
2216 } 2220 }
2217 $interface->extendedAttributes($extendedAttributeList); 2221 $interface->extendedAttributes($extendedAttributeList);
2218 } 2222 }
2219 2223
2220 1; 2224 1;
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698