implement if.else()

This commit is contained in:
suchmememanyskill
2021-07-09 23:46:21 +02:00
parent 623634b515
commit 65a28d8ef6
8 changed files with 55 additions and 10 deletions

View File

@@ -389,15 +389,17 @@ ParserRet_t parseScript(char* in) {
SCRIPT_PARSER_ERR("GET variable before {}");
continue;
}
// Set last arg to {}
CallArgs_t* lastCall = getLastRef(&lastOp->callArgs);
if (lastCall->extraAction == ActionExtraCallArgs) {
Function_t* funcArgs = lastCall->extra;
op.token = EquationSeperator;
op.lineNumber = lineNumber;
vecAdd(&funcArgs->operations, op);
op.token = Variable;
if (funcArgs->operations.count != 0) {
op.token = EquationSeperator;
op.lineNumber = lineNumber;
vecAdd(&funcArgs->operations, op);
op.token = Variable;
}
Variable_t a = newFunctionVariable(createFunctionClass(*popFunc, NULL));
vecAdd(&staticVariableHolder, a);