forked from ground/ground
Add any type for extlibs
This commit is contained in:
@@ -211,6 +211,12 @@ GroundValueType stringToValueType(char* in) {
|
||||
if (strcmp(in, "function") == 0) {
|
||||
return FUNCTION;
|
||||
}
|
||||
if (strcmp(in, "struct") == 0) {
|
||||
return STRUCTVAL;
|
||||
}
|
||||
if (strcmp(in, "any") == 0) {
|
||||
return ANY;
|
||||
}
|
||||
return CUSTOM;
|
||||
}
|
||||
|
||||
@@ -931,6 +937,10 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
||||
addVariable(scope->variables, in->args.args[1].value.refName, createStringGroundValue("struct"));
|
||||
break;
|
||||
}
|
||||
case ANY: {
|
||||
addVariable(scope->variables, in->args.args[1].value.refName, createStringGroundValue("any"));
|
||||
break;
|
||||
}
|
||||
case NONE: {
|
||||
addVariable(scope->variables, in->args.args[1].value.refName, createStringGroundValue("none"));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user