Implement maps
This commit is contained in:
parent
834ec9d3d4
commit
a8e4bfd264
@ -205,6 +205,21 @@ char* compile_expression(tSyntaxElement* syntaxelement) {
|
|||||||
string_append_free(&result,compile_gensplit(token, ","));
|
string_append_free(&result,compile_gensplit(token, ","));
|
||||||
string_append(&result,"]");
|
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 {
|
} else {
|
||||||
|
|
||||||
string_append(&result,token->content.string);
|
string_append(&result,token->content.string);
|
||||||
|
Loading…
Reference in New Issue
Block a user