diff --git a/src/compile.c b/src/compile.c index a68e90c..fced240 100644 --- a/src/compile.c +++ b/src/compile.c @@ -205,6 +205,21 @@ char* compile_expression(tSyntaxElement* syntaxelement) { string_append_free(&result,compile_gensplit(token, ",")); string_append(&result,"]"); + } else if (strcmp(token->content.string, "map") == 0) { + + string_append(&result,"{"); + for (tSyntaxElement* i = token->next; i != NULL; i = i->next) { + + string_append(&result, compile_expression(i->content.syntax)); + string_append(&result, ":"); + string_append(&result, compile_expression(i->content.syntax->next)); + + if (i->next != NULL) + string_append(&result,","); + + } + string_append(&result,"}"); + } else { string_append(&result,token->content.string);