function calling works in theory (can't test yet)
This commit is contained in:
22
src/Copy/BytecodeValue.c
Normal file
22
src/Copy/BytecodeValue.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "../../include/ground.h"
|
||||
|
||||
GroundBytecodeValue _GroundCopyBytecodeValue(GroundBytecodeValue* value) {
|
||||
GroundBytecodeValue newValue = *value;
|
||||
switch (value->type.type) {
|
||||
case GroundType_Int:
|
||||
case GroundType_Double:
|
||||
case GroundType_Bool:
|
||||
case GroundType_Char:
|
||||
break;
|
||||
|
||||
case GroundType_String: {
|
||||
newValue.as.String = Ground.Copy.String(&value->as.String);
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO: Implement copying for everything else
|
||||
default: break;
|
||||
}
|
||||
|
||||
return newValue;
|
||||
}
|
||||
Reference in New Issue
Block a user