Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

More accurate function arguments parsing
  • Loading branch information...
commit b20fb7aeb2209b4596fcbd27e7631c418e7dad5a 1 parent 8e45b1f
@Shura0 authored
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;
Please sign in to comment.
Something went wrong with that request. Please try again.