lang: ast: implement parsing of unnamed parameters
This commit is contained in:
@@ -269,8 +269,10 @@ static void to_string(struct ivy_ast_node *node, b_string *str)
|
||||
label = b_unbox(struct ivy_token, label_it.entry, t_entry);
|
||||
name = b_unbox(struct ivy_token, name_it.entry, t_entry);
|
||||
|
||||
if (label) {
|
||||
if (label && label->t_type == IVY_TOK_LABEL) {
|
||||
b_string_append_cstrf(str, "%s:", label->t_str);
|
||||
} else {
|
||||
b_string_append_cstrf(str, "_:");
|
||||
}
|
||||
|
||||
if (name) {
|
||||
|
||||
Reference in New Issue
Block a user