I think GDScript is somewhat compiled (intermediary) so I don't think you can compile it at run time. You probably want something like a DSL (domain specific language). You can write this in GDScript, it will be slower, but should be possible just using string functions. You can also write the language parser in C/C++ has a plug-in (such as a DLL) and leave the rest of your game in GDScript. This would likely be the fastest option.