From 1ab8f5d8bd9a730f8d6b11335343835b19fc4c3e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 26 Jan 2020 12:56:47 +0100 Subject: Temporary disable string indexing --- src/program.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/program.c b/src/program.c index 88f94a4..71b310e 100644 --- a/src/program.c +++ b/src/program.c @@ -48,6 +48,7 @@ static int program_output_temp(char *data, int size, void *userdata) { return 1; } +#if 0 static void tsl_string_to_ref(const TslString *self, TslStringView *result) { result->data = self->data; result->size = self->size; @@ -70,6 +71,7 @@ static TslProgramResult tsl_string_ref_get_item_at_index(const TslStringView *se return TSL_PROGRAM_RESULT_OK; } +#endif static TslProgramResult tsl_value_create_from_stack_value(TslProgram *self, TslValue *dst) { TslStackValue *src = tsl_buffer_pop(&self->stack_values, sizeof(TslStackValue)); @@ -206,12 +208,13 @@ static TslProgramResult tsl_value_create_from_stack_value(TslProgram *self, TslV dst->type = TSL_TYPE_NULL; } return TSL_PROGRAM_RESULT_OK; - } else if(var.type == TSL_TYPE_STRING) { + /*} else if(var.type == TSL_TYPE_STRING) { TslStringView str_ref; tsl_string_to_ref(var.data.string, &str_ref); return tsl_string_ref_get_item_at_index(&str_ref, &key, dst); } else if(var.type == TSL_TYPE_STRING_REF) { return tsl_string_ref_get_item_at_index(&var.data.string_ref, &key, dst); + */ } else { /* TODO: Print type as string */ fprintf(stderr, "Error: Unable to index data of type %d. Expected list or map\n", var.type); -- cgit v1.2.3