attempting to preserve token location between the reader and the compiler

This commit is contained in:
2021-01-06 09:37:29 +00:00
parent 75ecff7aca
commit 24b96e4c29
4 changed files with 95 additions and 7 deletions

View File

@ -799,7 +799,7 @@ static int get_sharp_token (hcl_t* hcl)
case 'e':
if (get_radix_number(hcl, c, 10) <= -1) return -1;
SET_TOKEN_TYPE (hcl, HCL_IOTOK_ERRORLIT);
SET_TOKEN_TYPE (hcl, HCL_IOTOK_ERRLIT);
break;
case 'p':
@ -2030,7 +2030,7 @@ static int read_object (hcl_t* hcl)
break;
}
case HCL_IOTOK_ERRORLIT:
case HCL_IOTOK_ERRLIT:
{
hcl_oow_t i;
hcl_ooi_t v = 0;
@ -2043,7 +2043,7 @@ static int read_object (hcl_t* hcl)
if (v > HCL_ERROR_MAX)
{
hcl_setsynerr (hcl, HCL_SYNERR_ERRORLIT, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
hcl_setsynerr (hcl, HCL_SYNERR_ERRLIT, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
return -1;
}
}