commit 8e4c715b79d707e7b9a9782227211715a0a6ccbb
parent bec30775e3ed2c933a3b026c794536070a3f6848
Author: Drew DeVault <sir@cmpwn.com>
Date: Wed, 28 Apr 2021 10:10:17 -0400
hare::parse: use insert
Diffstat:
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/hare/parse/type.ha b/hare/parse/type.ha
@@ -282,13 +282,8 @@ fn struct_embed_or_field(
};
},
ltok::DOUBLE_COLON => {
- // XXX: insert
- let rest = ident(lexer)?;
- let id: ast::ident = alloc([
- name.1 as str,
- ]);
- append(id, rest...);
- free(rest);
+ let id = ident(lexer)?;
+ insert(id[0], name.1 as str);
id;
},
* => abort(),