Chromium Code Reviews| Index: webkit/port/bindings/scripts/CodeGenerator.pm |
| =================================================================== |
| --- webkit/port/bindings/scripts/CodeGenerator.pm (revision 2436) |
| +++ webkit/port/bindings/scripts/CodeGenerator.pm (working copy) |
| @@ -115,6 +115,39 @@ |
| } |
| } |
| + |
| +sub FindParentsRecursively |
| +{ |
| + my $object = shift; |
| + my $dataNode = shift; |
| + my @parents = ($dataNode->name); |
| + foreach (@{$dataNode->parents}) { |
| + my $interface = $object->StripModule($_); |
| + |
| + $endCondition = 0; |
| + $foundFilename = ""; |
| + foreach (@{$useDirectories}) { |
| + $object->ScanDirectory("$interface.idl", $_, $_, 0) if ($foundFilename eq ""); |
| + } |
| + |
| + if ($foundFilename ne "") { |
| + print " | |> Parsing parent IDL \"$foundFilename\" for interface \"$interface\"\n" if $verbose; |
| + |
| + # Step #2: Parse the found IDL file (in quiet mode). |
| + my $parser = IDLParser->new(1); |
| + my $document = $parser->ParseInheritance($foundFilename, $defines, $preprocessor); |
| + |
| + foreach my $class (@{$document->classes}) { |
| + @parents = (@parents, FindParentsRecursively($object, $class)); |
| + } |
| + } else { |
| + die("Could NOT find specified parent interface \"$interface\"!\n") |
| + } |
| + } |
| + return @parents; |
| +} |
| + |
| + |
| sub AddMethodsConstantsAndAttributesFromParentClasses |
| { |
| # For the passed interface, recursively parse all parent |
| @@ -248,6 +281,8 @@ |
| my $useDirectory = shift; |
| my $reportAllFiles = shift; |
| + print "Scanning interface " . $interface . " in " . $directory . "\n" if $verbose; |
|
Mike Belshe
2008/09/23 00:36:13
Do we want this print statement? Or is this for d
Feng Qian
2008/09/23 21:46:04
For debugging purpose, the condition variable $ver
|
| + |
| return if ($endCondition eq 1) and ($reportAllFiles eq 0); |
| my $sourceRoot = $ENV{SOURCE_ROOT}; |