Enhanced C#
Language of your choice: library documentation
|
Represents the text form of a literal value, without its parsed value. More...
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... | |
|
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().
|
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().