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 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 # A Blink syntactic extension to allow string literals. |
| 1624 # The string quotes aren't kept. |
| 1625 if ($next->type() == StringToken) { |
| 1626 my $token = $self->getToken(); |
| 1627 return $self->parseExtendedAttributeRest3($self->unquoteString($token->v
alue())); |
| 1628 } |
1623 $self->assertUnexpectedToken($next->value(), __LINE__); | 1629 $self->assertUnexpectedToken($next->value(), __LINE__); |
1624 } | 1630 } |
1625 | 1631 |
1626 sub parseExtendedAttributeRest3 | 1632 sub parseExtendedAttributeRest3 |
1627 { | 1633 { |
1628 my $self = shift; | 1634 my $self = shift; |
1629 my $name = shift; | 1635 my $name = shift; |
1630 | 1636 |
1631 my $next = $self->nextToken(); | 1637 my $next = $self->nextToken(); |
1632 if ($next->value() eq "&") { | 1638 if ($next->value() eq "&") { |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2211 $customConstructor->overloadedIndex($index++); | 2217 $customConstructor->overloadedIndex($index++); |
2212 push(@{$interface->customConstructors}, $customConstructor); | 2218 push(@{$interface->customConstructors}, $customConstructor); |
2213 } | 2219 } |
2214 delete $extendedAttributeList->{"CustomConstructors"}; | 2220 delete $extendedAttributeList->{"CustomConstructors"}; |
2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; | 2221 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; |
2216 } | 2222 } |
2217 $interface->extendedAttributes($extendedAttributeList); | 2223 $interface->extendedAttributes($extendedAttributeList); |
2218 } | 2224 } |
2219 | 2225 |
2220 1; | 2226 1; |
OLD | NEW |