| 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 my $next = $self->nextToken(); | 825 my $next = $self->nextToken(); |
| 826 if ($next->value() eq "typedef") { | 826 if ($next->value() eq "typedef") { |
| 827 $self->assertTokenValue($self->getToken(), "typedef", __LINE__); | 827 $self->assertTokenValue($self->getToken(), "typedef", __LINE__); |
| 828 my $typedef = Typedef->new(); | 828 my $typedef = Typedef->new(); |
| 829 $typedef->extendedAttributes($self->parseExtendedAttributeListAllowEmpty
()); | 829 $typedef->extendedAttributes($self->parseExtendedAttributeListAllowEmpty
()); |
| 830 $typedef->type($self->parseType()); | 830 $typedef->type($self->parseType()); |
| 831 my $nameToken = $self->getToken(); | 831 my $nameToken = $self->getToken(); |
| 832 $self->assertTokenType($nameToken, IdentifierToken); | 832 $self->assertTokenType($nameToken, IdentifierToken); |
| 833 $self->assertTokenValue($self->getToken(), ";", __LINE__); | 833 $self->assertTokenValue($self->getToken(), ";", __LINE__); |
| 834 my $name = $nameToken->value(); | 834 my $name = $nameToken->value(); |
| 835 die "typedef redefinition for " . $name . " at " . $self->{Line} if exis
ts $typedefs{$name}; | 835 die "typedef redefinition for " . $name . " at " . $self->{Line} if (exi
sts $typedefs{$name} && $typedef->type ne $typedefs{$name}->type); |
| 836 $typedefs{$name} = $typedef; | 836 $typedefs{$name} = $typedef; |
| 837 return; | 837 return; |
| 838 } | 838 } |
| 839 $self->assertUnexpectedToken($next->value(), __LINE__); | 839 $self->assertUnexpectedToken($next->value(), __LINE__); |
| 840 } | 840 } |
| 841 | 841 |
| 842 sub parseImplementsStatement | 842 sub parseImplementsStatement |
| 843 { | 843 { |
| 844 my $self = shift; | 844 my $self = shift; |
| 845 my $extendedAttributeList = shift; | 845 my $extendedAttributeList = shift; |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2212 $customConstructor->{overloadedIndex} = $index++; | 2212 $customConstructor->{overloadedIndex} = $index++; |
| 2213 push(@{$interface->customConstructors}, $customConstructor); | 2213 push(@{$interface->customConstructors}, $customConstructor); |
| 2214 } | 2214 } |
| 2215 delete $extendedAttributeList->{"CustomConstructors"}; | 2215 delete $extendedAttributeList->{"CustomConstructors"}; |
| 2216 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; | 2216 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; |
| 2217 } | 2217 } |
| 2218 $interface->extendedAttributes($extendedAttributeList); | 2218 $interface->extendedAttributes($extendedAttributeList); |
| 2219 } | 2219 } |
| 2220 | 2220 |
| 2221 1; | 2221 1; |
| OLD | NEW |