Enhanced C#
Language of your choice: library documentation
Properties | List of all members
Loyc.IHasLocation Interface Reference

This interface allows an object to declare its "location". More...

Source file:
Inheritance diagram for Loyc.IHasLocation:
Loyc.LLParserGenerator.Pred Loyc.LogMessage Loyc.Syntax.ILNode Loyc.Syntax.LNode Loyc.LLParserGenerator.Alts Loyc.LLParserGenerator.AndPred Loyc.LLParserGenerator.DefaultErrorBranch Loyc.LLParserGenerator.EndOfRule Loyc.LLParserGenerator.Gate Loyc.LLParserGenerator.RuleRef Loyc.LLParserGenerator.Seq Loyc.LLParserGenerator.TerminalPred Loyc.Syntax.LNode Loyc.Syntax.CallNode Loyc.Syntax.IdNode Loyc.Syntax.LiteralNode


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.


object Location [get]