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

Unified Diff: Source/bindings/scripts/IDLParser.pm

Issue 14044026: Ready for latest WebIDL for named property getters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: removed debug code Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/scripts/IDLParser.pm
diff --git a/Source/bindings/scripts/IDLParser.pm b/Source/bindings/scripts/IDLParser.pm
index 42c56360172249d02c88e4082e288333a804f150..94fa23987e1968018afe3a4b4d012ce85d811ba4 100644
--- a/Source/bindings/scripts/IDLParser.pm
+++ b/Source/bindings/scripts/IDLParser.pm
@@ -75,6 +75,7 @@ struct( domAttribute => {
struct( domSignature => {
name => '$', # Variable name
type => '$', # Variable type
+ specials => '@', # Specials
extendedAttributes => '$', # Extended attributes
isOptional => '$', # Is variable optional (optional T)
isNullable => '$', # Is variable type Nullable (T?)
@@ -1205,12 +1206,14 @@ sub parseSpecialOperation
my $next = $self->nextToken();
if ($next->value() =~ /$nextSpecials_1/) {
- $self->parseSpecial();
- $self->parseSpecials();
+ my $specials = [];
+ push(@$specials, $self->parseSpecial());
haraken 2013/04/26 11:47:15 I think this isn't needed.
+ push(@$specials, @{$self->parseSpecials()});
my $returnType = $self->parseReturnType();
my $interface = $self->parseOperationRest($extendedAttributeList);
if (defined ($interface)) {
$interface->signature->type($returnType);
+ $interface->signature->specials($specials);
haraken 2013/04/26 11:47:15 You can also write: my @specials = (); push(@spec
kojih 2013/04/26 12:03:24 I like that style, but it's OK :)
haraken 2013/04/26 12:09:52 Other parts of IDLParser.pm uses 'my @foo=...' sty
}
return $interface;
}
@@ -1220,16 +1223,17 @@ sub parseSpecialOperation
sub parseSpecials
{
my $self = shift;
+ my $specials = [];
while (1) {
my $next = $self->nextToken();
if ($next->value() =~ /$nextSpecials_1/) {
- $self->parseSpecial();
+ push(@$specials, $self->parseSpecial());
} else {
last;
}
}
- return [];
+ return $specials;
haraken 2013/04/26 11:47:15 Ditto. You can write: my @specials = (); push(@sp
}
sub parseSpecial

Powered by Google App Engine
This is Rietveld 408576698