You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to add/send ancillary info from CallSites to Binders? #280
I am experimenting with the dlr by writing a toy language. I've based some of it on the examples given by the Sympl code in the dlr repo. I'm keeping it fairly simple - runtime objects are instances of a class derived from DynamicObject. Callable methods are also classes derived from DynamicObject (leveraging the TryGet/TrySet/TryInvoke features).
I would like to make source line number information available so that if something goes wrong and my runtime throws an exception, it can include the source line # in the error message.
I have used a custom field on my custom binders (deriving from GetMemberBinder, InvokeBinder, etc), but I suspect this is not the correct way to do it as that would prevent these binders from being re-used across call sites.
I had hoped that perhaps I could derive a custom class from CallInfo, but that is sealed.
How should/could this be done? Where might I find examples of something similar in another language's implementation on the dlr?
TIA
Activity