Changeset 94010 in webkit
- Timestamp:
- Aug 29, 2011, 1:32:32 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
bindings/scripts/IDLParser.pm (modified) (2 diffs)
-
bindings/scripts/IDLStructure.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r94009 r94010 1 2011-08-29 Patrick Gansterer <paroga@webkit.org> 2 3 Add parsing support for extended attributes on IDL constants 4 https://bugs.webkit.org/show_bug.cgi?id=65046 5 6 Reviewed by Brent Fulgham. 7 8 With support for extended attributes on constants we can 9 replace some preprocessor lines from the IDL files with 10 the corresponding [Conditional=XXX] later. 11 Using the preprocessor causes much pain on native windows. 12 13 CodeGenerator support will be added in separate patches. 14 15 * bindings/scripts/IDLParser.pm: 16 * bindings/scripts/IDLStructure.pm: 17 1 18 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> 2 19 -
trunk/Source/WebCore/bindings/scripts/IDLParser.pm
r91770 r94010 331 331 } elsif ($line =~ /^\s*const/) { 332 332 $line =~ /$IDLStructure::constantSelector/; 333 my $constType = (defined($1) ? $1 : die("Parsing error!\nSource:\n$line\n)")); 334 my $constName = (defined($2) ? $2 : die("Parsing error!\nSource:\n$line\n)")); 335 my $constValue = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)")); 333 my $constExtendedAttributes = (defined($1) ? $1 : " "); chop($constExtendedAttributes); 334 my $constType = (defined($2) ? $2 : die("Parsing error!\nSource:\n$line\n)")); 335 my $constName = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)")); 336 my $constValue = (defined($4) ? $4 : die("Parsing error!\nSource:\n$line\n)")); 336 337 337 338 my $newDataNode = new domConstant(); … … 339 340 $newDataNode->type($constType); 340 341 $newDataNode->value($constValue); 342 $newDataNode->extendedAttributes(parseExtendedAttributes($constExtendedAttributes)); 341 343 342 344 my $arrayRef = $dataNode->constants; -
trunk/Source/WebCore/bindings/scripts/IDLStructure.pm
r63908 r94010 71 71 type => '$', # Type of data 72 72 value => '$', # Constant value 73 extendedAttributes => '$', # Extended attributes 73 74 }); 74 75 … … 94 95 our $moduleSelector = 'module\s*(' . $idlId . '*)\s*{'; 95 96 our $moduleNSSelector = 'module\s*(' . $idlId . '*)\s*\[ns\s*(' . $idlIdNs . '*)\s*(' . $idlIdNs . '*)\]\s*;'; 96 our $constantSelector = 'const\s* ' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')';97 our $constantSelector = 'const\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')'; 97 98 our $raisesSelector = 'raises\s*\((' . $idlIdNsList . '*)\s*\)'; 98 99 our $getterRaisesSelector = '\bgetter\s+raises\s*\((' . $idlIdNsList . '*)\s*\)';
Note:
See TracChangeset
for help on using the changeset viewer.