forked from solstice/solstice
Fix function calling bug
This commit is contained in:
@@ -617,6 +617,7 @@ namespace Solstice {
|
|||||||
code.push_back(inputCodeBlock);
|
code.push_back(inputCodeBlock);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
exists(children[0]);
|
||||||
std::string fnToCall = children[0].outputId;
|
std::string fnToCall = children[0].outputId;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1179,6 +1180,7 @@ namespace Solstice {
|
|||||||
node.nodeType = SolNodeType::Expression;
|
node.nodeType = SolNodeType::Expression;
|
||||||
rootNode.addNode(node);
|
rootNode.addNode(node);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case SolNodeType::FunctionDef: {
|
case SolNodeType::FunctionDef: {
|
||||||
SolFunction fn;
|
SolFunction fn;
|
||||||
|
|||||||
4
tests/function.sols
Normal file
4
tests/function.sols
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
def add(int a, int b) {
|
||||||
|
return a + b
|
||||||
|
}
|
||||||
|
add(1, 2)
|
||||||
Reference in New Issue
Block a user