nupa_assignment(), cleanup
This commit is contained in:
parent
ba2c95243f
commit
5f0958026b
|
|
@ -1434,26 +1434,26 @@ nupa_assignment(dico_t *dico, const char * const s, char mode)
|
||||||
ls = (int) strlen(s);
|
ls = (int) strlen(s);
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|
||||||
while (((p - s) < ls) && (s[(p - s)] <= ' '))
|
while (((p - s) < ls) && (*p <= ' '))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (s[(p - s)] == Intro)
|
if (*p == Intro)
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (s[(p - s)] == '.') /* skip any dot keyword */
|
if (*p == '.') /* skip any dot keyword */
|
||||||
while (s[(p - s)] > ' ')
|
while (*p > ' ')
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while (((p - s) < ls) && !error) {
|
while (((p - s) < ls) && !error) {
|
||||||
|
|
||||||
p = getword(s + (p - s), &tstr) + 1;
|
p = getword(p, &tstr) + 1;
|
||||||
t_p = spice_dstring_value(&tstr);
|
t_p = spice_dstring_value(&tstr);
|
||||||
if (t_p[0] == '\0')
|
if (t_p[0] == '\0')
|
||||||
error = message(dico, " Identifier expected\n");
|
error = message(dico, " Identifier expected\n");
|
||||||
|
|
||||||
if (!error) {
|
if (!error) {
|
||||||
/* assignment expressions */
|
/* assignment expressions */
|
||||||
while (((p - s) <= ls) && (s[(p - s) - 1] != '='))
|
while (((p - s) <= ls) && (p[-1] != '='))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if ((p - s) > ls)
|
if ((p - s) > ls)
|
||||||
|
|
@ -1479,7 +1479,7 @@ nupa_assignment(dico_t *dico, const char * const s, char mode)
|
||||||
error = error || err;
|
error = error || err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((p - s) < ls) && (s[(p - s) - 1] != ';'))
|
if (((p - s) < ls) && (p[-1] != ';'))
|
||||||
error = message(dico, " ; sign expected.\n");
|
error = message(dico, " ; sign expected.\n");
|
||||||
/* else
|
/* else
|
||||||
p++; */
|
p++; */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue