Enhanced C#
Language of your choice: library documentation
|
Bundles the optional original text of a value with an optional in-memory form of it. More...
Bundles the optional original text of a value with an optional in-memory form of it.
ILNode objects that do not represent literals will have a Value property that returns NoValue.Value. Also, the TextValue and TypeMarker for a value may not be known, in which case they will return an empty string and null, respectively. It could also be that the ISerializedLiteral.TextValue is known but the value it represents is not known, in which case the Value may be a copy of the TextValue.
If this object represents a literal, Value should never be NoValue.Value, and it should not be null unless null is the actual value of the literal.
In all, a literal may have the the following valid combinations of properties:
!Value.Equals(TextValue)
or a boxed form of TextValue so that Value.Equals(TextValue)
. The latter case indicates that the parser did not recognize the TypeMarker, or that parsing the TextValue failed, that literal parsing is not enabled in the parser, or that the value is a string but the parser chose not to convert it to the .NET native string type. Caution: TextValue is UString and an "empty" UString is "equal" to a "null" UString since the list of characters is the same. Do not compare UString with null; instead, use UString.IsNull.
Additional Inherited Members | |
Properties inherited from Loyc.Syntax.IUninterpretedLiteral | |
UString | TextValue [get] |
Represents the serialized text of the value. More... | |
Symbol | TypeMarker [get] |
Represents the type of the value. More... | |
Properties inherited from Loyc.IHasValue< object > | |
T | Value [get] |