I'm not near a computer where I can try this but wanted to ask.
If I have injected a method name and an object instance into chaiscript I know I can write
method(instance, a, b, c)
instance.method(a, b, c)
However, can I define a chaiscript function both these ways? In other words, I know I can write
def method(instance, a, b, c)
// call back into a C++ method on the given instance
but supposing what I need to do is call that method FROM C++ (i.e. , a callback). Do I have to declare the chaiscript function as above or can I also write
def instance.method(a, b, c)
// This can be called from C++
In other words, I'm wondering if the syntax is consistent for both calling and defining functions with instances.