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

@@ -42,9 +42,6 @@ public:
case AstType::IfSt:
printIfSt(std::static_pointer_cast<IfSt>(node), indent);
break;
case AstType::LambdaExpr:
printLambdaExpr(std::static_pointer_cast<LambdaExprAst>(node), indent);
break;
case AstType::TernaryExpr:
printTernaryExpr(std::static_pointer_cast<TernaryExprAst>(node), indent);
break;
@@ -147,8 +144,6 @@ private:
printIndent(indent);
std::cout << "FunctionCall\n";
printIndent(indent + 2);
std::cout << "FuncName: ";
printFString(node->name, 0);
printIndent(indent + 2);
}
@@ -175,14 +170,6 @@ private:
printIndent(indent + 2);
}
void printLambdaExpr(const std::shared_ptr<LambdaExprAst> &node, int indent)
{
printIndent(indent);
std::cout << "LambdaExpr\n"
<< node->toString().toBasicString();
printIndent(indent + 2);
}
void printTernaryExpr(const std::shared_ptr<TernaryExprAst> &node, int indent)
{
printIndent(indent);