I have my own print function that replaces Chaiscript's. I'm wondering if I can add a feature here to show the context of a print statement being triggered.
For example, my C++ logging system uses this "info" macro.
#define info(string) diagnosticLog(p::INFO, __FILE__, __FUNCTION__, __LINE__, string);
Which uses compiler-defined values to work out where the print statement happened during compilation to produce:
"INFO[fake/path/file.cpp (fakeFunction:12)]: string"
Does chaiscript have anything that I can use like I used
__LINE__ in MSC? Or are there any alternative methods of getting the evaluation context that I can use from the C++ side?
Thanks for any help.