Better error messages for ill-formed time.

This commit is contained in:
Dianne Skoll
2024-09-11 08:52:06 -04:00
parent 97013ae89b
commit 42f5e3467d
3 changed files with 30 additions and 7 deletions
+5
View File
@@ -805,6 +805,11 @@ static int ParseTimeTrig(ParsePtr s, TimeTrig *tim)
break;
default:
if (tok.type == T_Illegal && tok.val < 0) {
Eprint("%s: `%s'", ErrMsg[-tok.val], DBufValue(&buf));
DBufFree(&buf);
return -tok.val;
}
if (tim->ttime == NO_TIME) return E_EXPECT_TIME;
PushToken(DBufValue(&buf), s);