OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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; |
OLD | NEW |