Procedure grouping foo :: proc[foo16, foo32];

This commit is contained in:
gingerBill
2017-12-03 23:03:40 +00:00
parent 9f52b2c283
commit 596a2c8355
5 changed files with 167 additions and 5 deletions

View File

@@ -2259,6 +2259,13 @@ void check_collect_value_decl(Checker *c, AstNode *decl) {
}
d->proc_lit = init;
d->type_expr = pl->type;
} else if (init->kind == AstNode_ProcGrouping) {
ast_node(pg, ProcGrouping, init);
e = make_entity_procedure_grouping(c->allocator, d->scope, token, nullptr);
if (fl != nullptr) {
error(name, "Procedure groupings are not allowed within a foreign block");
}
d->init_expr = init;
} else {
e = make_entity_constant(c->allocator, d->scope, token, nullptr, empty_exact_value);
d->type_expr = vd->type;