Language of your choice: library documentation
This interface allows an object to declare its "location". More...
This interface allows an object to declare its "location".
For example, Loyc.Syntax.LNode implements this interface so that when a compiler error refers to a source code construct, the error message contains the location of that source code rather than the code itself.
Given a context object that may or may not implement this interface, it's handy to use MessageSink.LocationString to convert the "context" of a message into a string, or MessageSink.LocationOf(object) to unwrap objects that implement IHasLocation.