touched up an error message shown for an invalid hashed literal encountered whose first character after # is invalid

This commit is contained in:
hyung-hwan 2018-04-10 10:10:50 +00:00
parent 13ecb7e337
commit dfee95436f

View File

@ -947,7 +947,8 @@ static int get_sharp_token (hcl_t* hcl)
if (is_delimiter(c)) if (is_delimiter(c))
{ {
/* EOF, whitespace, etc */ /* EOF, whitespace, etc */
hcl_setsynerr (hcl, HCL_SYNERR_HASHLIT, TOKEN_LOC(hcl), TOKEN_NAME(hcl)); hcl_setsynerrbfmt (hcl, HCL_SYNERR_HASHLIT, TOKEN_LOC(hcl), TOKEN_NAME(hcl),
"invalid hashed literal #%jc", c);
return -1; return -1;
} }
@ -967,7 +968,7 @@ static int get_sharp_token (hcl_t* hcl)
else else
{ {
hcl_setsynerrbfmt (hcl, HCL_SYNERR_HASHLIT, TOKEN_LOC(hcl), TOKEN_NAME(hcl), hcl_setsynerrbfmt (hcl, HCL_SYNERR_HASHLIT, TOKEN_LOC(hcl), TOKEN_NAME(hcl),
"invalid hashed literal name %.*js", hcl->c->tok.name.len, hcl->c->tok.name.ptr); "invalid hashed literal %.*js", hcl->c->tok.name.len, hcl->c->tok.name.ptr);
return -1; return -1;
} }