Closer to old state
This commit is contained in:
7
ast.cpp
7
ast.cpp
@@ -29,6 +29,7 @@ enum Ast_Kind: U32{
|
||||
AST_BLOCK,
|
||||
AST_PASS,
|
||||
AST_LAMBDA,
|
||||
AST_LAMBDA_EXPR,
|
||||
AST_LAMBDA_ARG,
|
||||
AST_ENUM,
|
||||
AST_ENUM_MEMBER,
|
||||
@@ -100,11 +101,14 @@ struct Ast_Unary: Ast_Expr{
|
||||
struct Ast_Cast: Ast_Expr{
|
||||
Ast_Expr *expr;
|
||||
Ast_Expr *typespec;
|
||||
Ast_Resolved_Type *before_type;
|
||||
Ast_Resolved_Type *after_type;
|
||||
};
|
||||
|
||||
struct Ast_Index: Ast_Expr{
|
||||
Ast_Expr *expr;
|
||||
Ast_Expr *index;
|
||||
Ast_Resolved_Type *original_type;
|
||||
};
|
||||
|
||||
struct Ast_Binary: Ast_Expr{
|
||||
@@ -154,6 +158,7 @@ struct Ast_Lambda : Ast_Expr {
|
||||
struct Ast_Array: Ast_Expr{
|
||||
Ast_Expr *base;
|
||||
Ast_Expr *expr;
|
||||
Ast_Resolved_Type *type;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -335,7 +340,7 @@ ast_expr_index(Token *pos, Ast_Expr *expr, Ast_Expr *index){
|
||||
|
||||
function Ast_Lambda *
|
||||
ast_lambda(Token *pos, Array<Ast_Decl *> params, B32 has_var_args, Ast_Expr *ret, Ast_Scope *scope){
|
||||
AST_NEW(Lambda, LAMBDA, pos, AST_EXPR);
|
||||
AST_NEW(Lambda, LAMBDA_EXPR, pos, AST_EXPR);
|
||||
result->flags = AST_EXPR;
|
||||
result->args = params.tight_copy(pctx->perm);
|
||||
result->scope = scope;
|
||||
|
||||
Reference in New Issue
Block a user