Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update plugins/symbolbrowser/symbols/parsers/parser_perl.cpp #39

Merged
merged 1 commit into from

2 participants

@Shura0

More accurate function arguments parsing

@Mezomish Mezomish merged commit 406287b into Mezomish:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 15, 2012
  1. @Shura0

    Update plugins/symbolbrowser/symbols/parsers/parser_perl.cpp

    Shura0 authored
    More accurate function arguments parsing
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 7 deletions.
  1. +20 −7 plugins/symbolbrowser/symbols/parsers/parser_perl.cpp
View
27 plugins/symbolbrowser/symbols/parsers/parser_perl.cpp
@@ -267,20 +267,33 @@ QString Parser_Perl::parseArgs()
if(*cp=='\0')continue;
if(*cp=='#') continue;
if(strstr(cp,"{"))
- if(!strstr(cp,"shift"))
+ if(!(strstr(cp,"shift") || strstr(cp,"@_")))
continue;
- if(strstr(cp,"shift"))
+ if(strstr(cp,"shift") || strstr(cp, "@_"))
{
- cp=strstr(cp,"$");
+ if(strstr(cp,"$"))
+ cp=strstr(cp,"$");
+ else
+ {
+ if(strstr(cp,"@"))
+ {
+ if((strstr(cp,"@") != strstr(cp,"@_")))
+ cp=strstr(cp,"@");
+ else
+ cp=NULL;
+ }
+ else
+ cp=NULL;
+ }
if(cp)
{
printf("no $!!\n");
if(!res.isEmpty())res.append(", ");
-
- while(*cp !='=' and *cp!='\0')
+ while(*cp !='=' && *cp!='\0' && *cp!=')' && *cp!=';')
{
- res.append(*cp);
- cp++;
+ if(*cp!=' ')
+ res.append(*cp);
+ cp++;
}
}else
continue;
Something went wrong with that request. Please try again.