Replace identifier by func not only after '=', but also '{'
Extension to commit
61e48f984 ("Start replacing identifiers by func only after the first '='", 2021-06-18)
This commit is contained in:
parent
68e51848a4
commit
87a9d87f7d
|
|
@ -7110,8 +7110,17 @@ static char *inp_functionalise_identifier(char *curr_line, char *identifier)
|
|||
size_t len = strlen(identifier);
|
||||
char *p, *str = curr_line;
|
||||
|
||||
/* Start replacing identifier by func only after the first '=' */
|
||||
char* estr = strchr(curr_line, '=');
|
||||
/* Start replacing identifier by func only after the first '=' or '{' */
|
||||
char* estr1 = strchr(curr_line, '=');
|
||||
char* estr2 = strchr(curr_line, '{');
|
||||
char* estr;
|
||||
if (estr1 && estr2)
|
||||
estr = (estr1 < estr2) ? estr1 : estr2;
|
||||
else if (estr1)
|
||||
estr = estr1;
|
||||
else
|
||||
estr = estr2;
|
||||
|
||||
|
||||
for (p = estr; (p = search_identifier(p, identifier, str)) != NULL;)
|
||||
if (p[len] != '(') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue