summaryrefslogtreecommitdiffstats
path: root/dcop/dcopidlng/kdocAstUtil.pm
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/dcopidlng/kdocAstUtil.pm')
-rw-r--r--dcop/dcopidlng/kdocAstUtil.pm38
1 files changed, 19 insertions, 19 deletions
diff --git a/dcop/dcopidlng/kdocAstUtil.pm b/dcop/dcopidlng/kdocAstUtil.pm
index 27f65dd21..ec67ace5f 100644
--- a/dcop/dcopidlng/kdocAstUtil.pm
+++ b/dcop/dcopidlng/kdocAstUtil.pm
@@ -17,13 +17,13 @@ use strict;
use vars qw/ $depth $refcalls $refiters @noreflist %noref /;
sub BEGIN {
-# statistics for tqfindRef
+# statistics for findRef
$depth = 0;
$refcalls = 0;
$refiters = 0;
-# tqfindRef will ignore these words
+# findRef will ignore these words
@noreflist = qw( const int char long double template
unsigned signed float void bool true false uint
@@ -35,22 +35,22 @@ sub BEGIN {
}
-=head2 tqfindRef
+=head2 findRef
Parameters: root, ident, report-on-fail
Returns: node, or undef
Given a root node and a fully qualified identifier (:: separated),
- this function will try to tqfind a child of the root node that matches
+ this function will try to find a child of the root node that matches
the identifier.
=cut
-sub tqfindRef
+sub findRef
{
my( $root, $name, $r ) = @_;
- confess "tqfindRef: no name" if !defined $name || $name eq "";
+ confess "findRef: no name" if !defined $name || $name eq "";
$name =~ s/\s+//g;
return undef if exists $noref{ $name };
@@ -65,7 +65,7 @@ sub tqfindRef
# Upward search for the first token
return undef if !defined $iter;
- while ( !defined tqfindIn( $root, $iter ) ) {
+ while ( !defined findIn( $root, $iter ) ) {
return undef if !defined $root->{Parent};
$root = $root->{Parent};
}
@@ -77,8 +77,8 @@ sub tqfindRef
confess "iter in $name is undefined\n" if !defined $iter;
next if $iter =~ /^\s*$/;
- unless ( defined tqfindIn( $root, $iter ) ) {
- confess "tqfindRef: failed on '$name' at '$iter'\n"
+ unless ( defined findIn( $root, $iter ) ) {
+ confess "findRef: failed on '$name' at '$iter'\n"
if defined $r;
return undef;
}
@@ -90,13 +90,13 @@ sub tqfindRef
return $root;
}
-=head2 tqfindIn
+=head2 findIn
node, name: search for a child
=cut
-sub tqfindIn
+sub findIn
{
return undef unless defined $_[0]->{KidHash};
@@ -147,7 +147,7 @@ ANITER:
next ANITER;
}
- my $ref = kdocAstUtil::tqfindRef( $rnode,
+ my $ref = kdocAstUtil::findRef( $rnode,
$in->{astNodeName} );
if( !defined $ref ) {
@@ -302,16 +302,16 @@ sub allMembers
}
}
-=head2 tqfindOverride
+=head2 findOverride
Parameters: root, node, name
Looks for nodes of the same name as the parameter, in its parent
- and the parent's ancestors. It returns a node if it tqfinds one.
+ and the parent's ancestors. It returns a node if it finds one.
=cut
-sub tqfindOverride
+sub findOverride
{
my ( $root, $node, $name ) = @_;
return undef if !exists $node->{InList};
@@ -325,7 +325,7 @@ sub tqfindOverride
return $n if defined $ref && $ref->{NodeType} eq "method";
if ( exists $n->{InList} ) {
- $ref = tqfindOverride( $root, $n, $name );
+ $ref = findOverride( $root, $n, $name );
return $ref if defined $ref;
}
}
@@ -464,14 +464,14 @@ sub testRef {
my $rootNode = $_[ 0 ];
- my $term = new Term::ReadLine 'Testing tqfindRef';
+ my $term = new Term::ReadLine 'Testing findRef';
my $OUT = $term->OUT || *STDOUT{IO};
my $prompt = "Identifier: ";
while( defined ($_ = $term->readline($prompt)) ) {
- my $node = kdocAstUtil::tqfindRef( $rootNode, $_ );
+ my $node = kdocAstUtil::findRef( $rootNode, $_ );
if( defined $node ) {
print $OUT "Reference: '", $node->{astNodeName},
@@ -487,7 +487,7 @@ sub testRef {
sub printDebugStats
{
- print "tqfindRef: ", $refcalls, " calls, ",
+ print "findRef: ", $refcalls, " calls, ",
$refiters, " iterations.\n";
}