1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
|
}else if( type & PS_Private ){
StringAppend(&str, "private:\n", 0);
pDecl->extraType = PS_Private;
}
}
StringAppend(&str, " ", 0);
zDecl = TokensToString(pFirst, pLast, ";\n", pClass, 2);
StringAppend(&str, zDecl, 0);
SafeFree(zDecl);
pDecl->zExtra = StrDup(StringGet(&str), 0);
StringReset(&str);
return 0;
}
|
>
>
>
>
>
>
>
>
>
>
|
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
|
}else if( type & PS_Private ){
StringAppend(&str, "private:\n", 0);
pDecl->extraType = PS_Private;
}
}
StringAppend(&str, " ", 0);
zDecl = TokensToString(pFirst, pLast, ";\n", pClass, 2);
if(strncmp(zDecl, pClass->zText, pClass->nText)==0){
/* If member initializer list is found after a constructor,
** skip that part. */
char * colon = strchr(zDecl, ':');
if(colon!=0 && colon[1]!=0){
*colon++ = ';';
*colon++ = '\n';
*colon = 0;
}
}
StringAppend(&str, zDecl, 0);
SafeFree(zDecl);
pDecl->zExtra = StrDup(StringGet(&str), 0);
StringReset(&str);
return 0;
}
|
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
|
}
pName = FindDeclName(pFirst,pLast);
if( pName==0 ){
fprintf(stderr,"%s:%d: Malformed function or procedure definition.\n",
zFilename, pFirst->nLine);
return 1;
}
/*
** At this point we've isolated a procedure declaration between pFirst
** and pLast with the name pName.
*/
#ifdef DEBUG
if( debugMask & PARSER ){
printf("**** Found routine: %.*s on line %d...\n", pName->nText,
|
>
>
>
|
|
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
|
}
pName = FindDeclName(pFirst,pLast);
if( pName==0 ){
fprintf(stderr,"%s:%d: Malformed function or procedure definition.\n",
zFilename, pFirst->nLine);
return 1;
}
if( strncmp(pName->zText,"main",pName->nText)==0 ){
/* skip main() decl. */
return 0;
}
/*
** At this point we've isolated a procedure declaration between pFirst
** and pLast with the name pName.
*/
#ifdef DEBUG
if( debugMask & PARSER ){
printf("**** Found routine: %.*s on line %d...\n", pName->nText,
|
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
|
zNew[j] = malloc( n + 1 );
if( zNew[j] ){
strcpy( zNew[j], zBuf );
}
}
}
}
newArgc = argc + nNew - 1;
for(i=0; i<=index; i++){
zNew[i] = argv[i];
}
for(i=nNew + index + 1; i<newArgc; i++){
zNew[i] = argv[i + 1 - nNew];
}
|
>
|
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
|
zNew[j] = malloc( n + 1 );
if( zNew[j] ){
strcpy( zNew[j], zBuf );
}
}
}
}
fclose(in);
newArgc = argc + nNew - 1;
for(i=0; i<=index; i++){
zNew[i] = argv[i];
}
for(i=nNew + index + 1; i<newArgc; i++){
zNew[i] = argv[i + 1 - nNew];
}
|