mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-27 12:41:46 +00:00
Attempt bracketing checking.
Too bad we can't issue a diagnostic here now; we just return failure and the caller will probably next try a whitespace delimited string next.
This commit is contained in:
14
parse.c
14
parse.c
@@ -831,12 +831,18 @@ int brackrange(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we see a newline here, the proper terminator must be missing.
|
||||
* Don't use EOL() to check: it recognizes ';' too.
|
||||
* Unfortunately we can't issue a diagnostic here.
|
||||
*/
|
||||
if (!cp[len] || cp[len] == '\n') {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*length = len;
|
||||
if (endp) {
|
||||
*endp = cp + len;
|
||||
if (**endp && **endp != '\n') {
|
||||
++*endp; /* skip over ending delimiter */
|
||||
}
|
||||
*endp = cp + len + 1; /* skip over ending delimiter */
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user