support function literal, set builtins to global context. great!

This commit is contained in:
2025-12-20 20:27:36 +08:00
parent b9a98150ae
commit e7ca714a89
19 changed files with 362 additions and 502 deletions

View File

@@ -30,6 +30,7 @@ namespace Fig::Ast
TupleExpr, // ()
MapExpr, // {}
InitExpr, // struct{}
FunctionLiteralExpr,
/* Statement */
BlockStatement,
@@ -312,7 +313,7 @@ namespace Fig::Ast
class BlockStatementAst : public StatementAst
{
public:
const std::vector<Statement> stmts;
std::vector<Statement> stmts;
BlockStatementAst()
{
type = AstType::BlockStatement;