summaryrefslogtreecommitdiff
path: root/src/sp_var_parser.c
diff options
context:
space:
mode:
authorBeF2022-07-20 12:15:07 +0200
committerGitHub2022-07-20 12:15:07 +0200
commit2aed4220c2d019cc9b46fec70cfd79d249498e14 (patch)
treee7cc3d1d4db617fc5ab1dbcc60f2366407eb5da5 /src/sp_var_parser.c
parent72109c9bf016145364b19162a5ff998fc5858a9c (diff)
parent75595945d1d868fbd6db743809ca8a3eb5de3113 (diff)
Merge pull request #1 from jvoisin/pr1
pr for fetching upstream
Diffstat (limited to 'src/sp_var_parser.c')
-rw-r--r--src/sp_var_parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sp_var_parser.c b/src/sp_var_parser.c
index 2639991..e7ff766 100644
--- a/src/sp_var_parser.c
+++ b/src/sp_var_parser.c
@@ -245,15 +245,15 @@ static sp_tree *parse_tokens(const char *restrict str,
245} 245}
246 246
247sp_tree *sp_parse_var(const char *line) { 247sp_tree *sp_parse_var(const char *line) {
248 sp_list_node *tokens_list = NULL; 248 static const sp_conf_token delimiter_list[] = {
249 sp_tree *tree = NULL;
250 const sp_conf_token delimiter_list[] = {
251 {.type = OBJECT, .text_repr = OBJECT_TOKEN}, 249 {.type = OBJECT, .text_repr = OBJECT_TOKEN},
252 {.type = ARRAY, .text_repr = ARRAY_TOKEN}, 250 {.type = ARRAY, .text_repr = ARRAY_TOKEN},
253 {.type = ARRAY_END, .text_repr = ARRAY_END_TOKEN}, 251 {.type = ARRAY_END, .text_repr = ARRAY_END_TOKEN},
254 {.type = INTERPRETED_STRING, .text_repr = STRING_TOKEN}, 252 {.type = INTERPRETED_STRING, .text_repr = STRING_TOKEN},
255 {.type = LITERAL_STRING, .text_repr = ESC_STRING_TOKEN}, 253 {.type = LITERAL_STRING, .text_repr = ESC_STRING_TOKEN},
256 {.type = CLASS, .text_repr = CLASS_TOKEN}}; 254 {.type = CLASS, .text_repr = CLASS_TOKEN}};
255 sp_list_node *tokens_list = NULL;
256 sp_tree *tree = NULL;
257 257
258 if (!line) { 258 if (!line) {
259 return NULL; 259 return NULL;