From b35ed20c683f4b76c6efc84949b72e2fc72d47d0 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 20 Jan 2024 01:17:32 +0900 Subject: [PATCH] updated the reader code to ignore EOL inside vlist --- lib/read.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/read.c b/lib/read.c index 420bff4..eed86c1 100644 --- a/lib/read.c +++ b/lib/read.c @@ -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 (TOKEN_TYPE(hcl) == HCL_TOK_EOL) goto ok; /* ignore EOL inside vlist */ + /* vlist also has special requirement that it can only contain variable names. */ hcl_setsynerr (hcl, HCL_SYNERR_VARNAME, TOKEN_LOC(hcl), TOKEN_NAME(hcl)); goto oops;