Closed c3d closed 4 years ago
Implemented in the native.h header file.
Typical usage found in the runtime.
Tree * xl_evaluate(Scope *scope, Tree *tree)
// ----------------------------------------------------------------------------
// Dispatch evaluation to the main entry point
// ----------------------------------------------------------------------------
{
return MAIN->Evaluate(scope, tree);
}
XL_NATIVE(evaluate);
Provide an easy-to-use way to generate the foreign function interface (FFI) to call into C code.
The objective is make it very quick to "export" a C function in such a way that it can be called by XL code. Ideally, the whole process would be automated by the C++ compiler using meta-programming techniques.