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

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

Issue 124943002: Perl IDL parser: allow extended attributes to have more than 2 values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 } 1624 }
1625 1625
1626 sub parseExtendedAttributeRest3 1626 sub parseExtendedAttributeRest3
1627 { 1627 {
1628 my $self = shift; 1628 my $self = shift;
1629 my $name = shift; 1629 my $name = shift;
1630 1630
1631 my $next = $self->nextToken(); 1631 my $next = $self->nextToken();
1632 if ($next->value() eq "&") { 1632 if ($next->value() eq "&") {
1633 $self->assertTokenValue($self->getToken(), "&", __LINE__); 1633 $self->assertTokenValue($self->getToken(), "&", __LINE__);
1634 my $rightValue = $self->parseScopedName(); 1634 return $name . "&" . $self->parseExtendedAttributeRest2();
Nils Barth (inactive) 2014/01/06 07:09:53 To explain the crypticness: parseExtendedAttribute
1635 return $name . "&" . $rightValue;
1636 } 1635 }
1637 if ($next->value() eq "|") { 1636 if ($next->value() eq "|") {
1638 $self->assertTokenValue($self->getToken(), "|", __LINE__); 1637 $self->assertTokenValue($self->getToken(), "|", __LINE__);
1639 my $rightValue = $self->parseScopedName(); 1638 return $name . "|" . $self->parseExtendedAttributeRest2();
1640 return $name . "|" . $rightValue;
1641 } 1639 }
1642 if ($next->value() eq "(") { 1640 if ($next->value() eq "(") {
1643 my $attr = {}; 1641 my $attr = {};
1644 $self->assertTokenValue($self->getToken(), "(", __LINE__); 1642 $self->assertTokenValue($self->getToken(), "(", __LINE__);
1645 $attr->{$name} = $self->parseArgumentList(); 1643 $attr->{$name} = $self->parseArgumentList();
1646 $self->assertTokenValue($self->getToken(), ")", __LINE__); 1644 $self->assertTokenValue($self->getToken(), ")", __LINE__);
1647 return $attr; 1645 return $attr;
1648 } 1646 }
1649 if ($next->type() == IdentifierToken || $next->value() =~ /$nextExtendedAttr ibuteRest3_1/) { 1647 if ($next->type() == IdentifierToken || $next->value() =~ /$nextExtendedAttr ibuteRest3_1/) {
1650 my @names = (); 1648 my @names = ();
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 $customConstructor->overloadedIndex($index++); 2211 $customConstructor->overloadedIndex($index++);
2214 push(@{$interface->customConstructors}, $customConstructor); 2212 push(@{$interface->customConstructors}, $customConstructor);
2215 } 2213 }
2216 delete $extendedAttributeList->{"CustomConstructors"}; 2214 delete $extendedAttributeList->{"CustomConstructors"};
2217 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; 2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING";
2218 } 2216 }
2219 $interface->extendedAttributes($extendedAttributeList); 2217 $interface->extendedAttributes($extendedAttributeList);
2220 } 2218 }
2221 2219
2222 1; 2220 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698