Fix function calling bug

This commit is contained in:
2025-12-26 13:50:14 +11:00
parent d8812fa14e
commit 337b88c148
2 changed files with 6 additions and 0 deletions

View File

@@ -617,6 +617,7 @@ namespace Solstice {
code.push_back(inputCodeBlock);
break;
}
exists(children[0]);
std::string fnToCall = children[0].outputId;
break;
@@ -1179,6 +1180,7 @@ namespace Solstice {
node.nodeType = SolNodeType::Expression;
rootNode.addNode(node);
}
break;
}
case SolNodeType::FunctionDef: {
SolFunction fn;

4
tests/function.sols Normal file
View File

@@ -0,0 +1,4 @@
def add(int a, int b) {
return a + b
}
add(1, 2)