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