updated the reader code to ignore EOL inside vlist
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
828bdbb6b7
commit
b35ed20c68
@ -1109,6 +1109,8 @@ static int feed_process_token (hcl_t* hcl)
|
|||||||
|
|
||||||
if (frd->expect_vlist_item && TOKEN_TYPE(hcl) != HCL_TOK_IDENT && TOKEN_TYPE(hcl) != HCL_TOK_VBAR)
|
if (frd->expect_vlist_item && TOKEN_TYPE(hcl) != HCL_TOK_IDENT && TOKEN_TYPE(hcl) != HCL_TOK_VBAR)
|
||||||
{
|
{
|
||||||
|
if (TOKEN_TYPE(hcl) == HCL_TOK_EOL) goto ok; /* ignore EOL inside vlist */
|
||||||
|
|
||||||
/* vlist also has special requirement that it can only contain variable names. */
|
/* vlist also has special requirement that it can only contain variable names. */
|
||||||
hcl_setsynerr (hcl, HCL_SYNERR_VARNAME, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
hcl_setsynerr (hcl, HCL_SYNERR_VARNAME, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
||||||
goto oops;
|
goto oops;
|
||||||
|
Loading…
Reference in New Issue
Block a user