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

Represents the text form of a literal value, without its parsed value. More...


Source file:
Inheritance diagram for Loyc.Syntax.IUninterpretedLiteral:
Loyc.Syntax.ILiteralValue Loyc.Syntax.ISerializedLiteral Loyc.Syntax.UninterpretedLiteral Loyc.Syntax.ILNode Loyc.Syntax.LiteralValue Loyc.Syntax.LNode Loyc.Syntax.LNode Loyc.Syntax.CallNode Loyc.Syntax.IdNode Loyc.Syntax.LiteralNode Loyc.Syntax.CallNode Loyc.Syntax.IdNode Loyc.Syntax.LiteralNode

Remarks

Represents the text form of a literal value, without its parsed value.

Properties

UString TextValue [get]
 Represents the serialized text of the value. More...
 
Symbol TypeMarker [get]
 Represents the type of the value. More...
 

Property Documentation

◆ TextValue

UString Loyc.Syntax.IUninterpretedLiteral.TextValue
get

Represents the serialized text of the value.

Typically this will be an unescaped form of the string; for example in LES3, if the TextValue is C:\Users, the original text may have been C:\\Users.

Since this property has type UString which is a struct, it cannot be null, but TextValue.IsNull can be true when this interface is part of ILiteralValue or ILNode. This means either that the original text form of the literal has been discarded, or that it never existed. For example if you call Loyc.Syntax.LNode.Literal(123) it will create a "synthetic" node representing the integer 123. In that case, there is no text form, TextValue.IsNull will be true and TypeMarker will be null.

Referenced by Loyc.Syntax.LNode.Equals().

◆ TypeMarker

Symbol Loyc.Syntax.IUninterpretedLiteral.TypeMarker
get

Represents the type of the value.

The Type Marker indicates not just the type but also the syntax of the TextValue. If the syntax of a TextValue is not compatible with the syntax used in LES, it should not use the same type marker as is used in LES.

The TypeMarker can be null when this object is a ILNode and no type marker was assigned to it, either because the node is synthetic (did not come from a source file) or the parser simple did not assign one. In this case, TextValue.IsNull is true. Conversely, if the TypeMarker is not null, TextValue.IsNull may be true or false (for details, see the documentation of ILiteralValue).

Referenced by Loyc.Syntax.LNode.Equals(), and Loyc.Syntax.LiteralHandlerTable.TryPrint().