Work on lambda body
This commit is contained in:
@@ -28,6 +28,8 @@ struct Operand{
|
||||
};
|
||||
};
|
||||
|
||||
global Ast_Decl empty_decl = {};
|
||||
|
||||
function void
|
||||
sym_insert(Sym *sym){
|
||||
U64 hash = hash_string(sym->name.s);
|
||||
@@ -55,7 +57,6 @@ sym_new(Sym_Kind kind, Intern_String name, Ast_Resolved_Type *type, Ast_Decl *de
|
||||
return result;
|
||||
}
|
||||
|
||||
global Ast_Decl empty_decl = {};
|
||||
function void
|
||||
sym_insert_builtin_type(String name, Ast_Resolved_Type *type){
|
||||
Intern_String string = intern_string(&pctx->interns, name);
|
||||
@@ -224,6 +225,16 @@ eval_expr(Ast_Expr *ast, Ast_Resolved_Type *expected_type){
|
||||
|
||||
Ast_Begin(AST_LAMBDA, Ast_Lambda){
|
||||
Ast_Resolved_Type *type = eval_typespec(ast_typespec_lambda(0, node));
|
||||
|
||||
// @todo: typecheck the function
|
||||
// enter scope -
|
||||
// push local syms etc.
|
||||
// Make sure return type is matching function return type
|
||||
// quit scope
|
||||
For(node->block->stmts){
|
||||
|
||||
}
|
||||
|
||||
return {type, true};
|
||||
Ast_End();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user