mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-22 13:51:53 +02:00
When entering a name with variable expansion, the "invalid character in
variable name" error was never cleared. - inst.c (validate_pad_name): call status_begin_reporting before expanding the string, to clear any previous error - expr.c (expand): if the last character in the name is a dollar sign, print "incomplete variable name" instead of "invalid character [...]" git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5731 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
1613d4bdbc
commit
9cd195bf5b
10
expr.c
10
expr.c
@ -380,8 +380,14 @@ char *expand(const char *name, const struct frame *frame)
|
|||||||
if (*s != '{') {
|
if (*s != '{') {
|
||||||
while (is_id_char(*s, s == s0))
|
while (is_id_char(*s, s == s0))
|
||||||
s++;
|
s++;
|
||||||
if (s == s0)
|
if (s == s0) {
|
||||||
goto invalid;
|
if (*s)
|
||||||
|
goto invalid;
|
||||||
|
else {
|
||||||
|
fail("incomplete variable name");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
}
|
||||||
var = strnalloc(s0, s-s0);
|
var = strnalloc(s0, s-s0);
|
||||||
len -= s-s0+1;
|
len -= s-s0+1;
|
||||||
s--;
|
s--;
|
||||||
|
Loading…
Reference in New Issue
Block a user