private static string GetStringValue(LiteralToken arg) { Type argType = arg.GetValueType(); if (argType == typeof(string)) { return(arg.GetAs <string>()); } else if (argType == typeof(double)) { return(arg.GetAs <double>().ToString()); } else if (argType == typeof(int)) { return(arg.GetAs <int>().ToString()); } else if (argType == typeof(bool)) { return(arg.GetAs <bool>().ToString()); } throw new ScriptRuntimeException($"Unsupported type for Stringification: type {argType.Name}"); }