From dfee95436f908084dce80ff63a182d88f828cedf Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 10 Apr 2018 10:10:50 +0000 Subject: [PATCH] touched up an error message shown for an invalid hashed literal encountered whose first character after # is invalid --- lib/read.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/read.c b/lib/read.c index 8465d81..ac99c02 100644 --- a/lib/read.c +++ b/lib/read.c @@ -947,7 +947,8 @@ static int get_sharp_token (hcl_t* hcl) if (is_delimiter(c)) { /* 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; } @@ -967,7 +968,7 @@ static int get_sharp_token (hcl_t* hcl) else { 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; }