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

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

Issue 127903002: Empty reflected attributes and string literals in extended attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 my $self = shift; 226 my $self = shift;
227 $self->{Token} = $self->{NextToken}; 227 $self->{Token} = $self->{NextToken};
228 $self->{NextToken} = $self->getTokenInternal(); 228 $self->{NextToken} = $self->getTokenInternal();
229 return $self->{Token}; 229 return $self->{Token};
230 } 230 }
231 231
232 my $whitespaceTokenPattern = '^[\t\n\r ]*[\n\r]'; 232 my $whitespaceTokenPattern = '^[\t\n\r ]*[\n\r]';
233 my $floatTokenPattern = '^(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?| [0-9]+[Ee][+-]?[0-9]+))'; 233 my $floatTokenPattern = '^(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?| [0-9]+[Ee][+-]?[0-9]+))';
234 my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)'; 234 my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)';
235 my $stringTokenPattern = '^(\"[^\"]*\")'; 235 my $stringTokenPattern = '^(\"[^\"]*\")';
236 my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z]*)'; 236 my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z-]*)';
haraken 2014/01/08 10:45:38 This isn't a right change. The Web IDL grammar sa
sof 2014/01/08 10:50:12 Either the "identifier" syntactic category is reus
Nils Barth (inactive) 2014/01/08 11:28:29 To concur with haraken: AFAICT, we want this to ho
237 my $otherTokenPattern = '^(::|\.\.\.|[^\t\n\r 0-9A-Z_a-z])'; 237 my $otherTokenPattern = '^(::|\.\.\.|[^\t\n\r 0-9A-Z_a-z])';
238 238
239 sub getTokenInternal 239 sub getTokenInternal
240 { 240 {
241 my $self = shift; 241 my $self = shift;
242 242
243 if ($self->{DocumentContent} =~ /$whitespaceTokenPattern/) { 243 if ($self->{DocumentContent} =~ /$whitespaceTokenPattern/) {
244 $self->{DocumentContent} =~ s/($whitespaceTokenPattern)//; 244 $self->{DocumentContent} =~ s/($whitespaceTokenPattern)//;
245 my $skipped = $1; 245 my $skipped = $1;
246 $self->{LineNumber}++ while ($skipped =~ /\n/g); 246 $self->{LineNumber}++ while ($skipped =~ /\n/g);
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 $customConstructor->overloadedIndex($index++); 2211 $customConstructor->overloadedIndex($index++);
2212 push(@{$interface->customConstructors}, $customConstructor); 2212 push(@{$interface->customConstructors}, $customConstructor);
2213 } 2213 }
2214 delete $extendedAttributeList->{"CustomConstructors"}; 2214 delete $extendedAttributeList->{"CustomConstructors"};
2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; 2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING";
2216 } 2216 }
2217 $interface->extendedAttributes($extendedAttributeList); 2217 $interface->extendedAttributes($extendedAttributeList);
2218 } 2218 }
2219 2219
2220 1; 2220 1;
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698