Class ConstantCodec
A codec for constants.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Flame.Ir
Assembly: Flame.Ir.dll
Syntax
public sealed class ConstantCodec : Codec<Constant, LNode>
Fields
| Improve this Doc View SourceInstance
An instance of the constant codec.
Declaration
public static readonly ConstantCodec Instance
Field Value
| Type | Description |
|---|---|
| ConstantCodec |
Methods
| Improve this Doc View SourceDecode(LNode, DecoderState)
Decodes an LNode as a constant value.
Declaration
public override Constant Decode(LNode node, DecoderState state)
Parameters
| Type | Name | Description |
|---|---|---|
| Loyc.Syntax.LNode | node | The node to decode. |
| DecoderState | state | The decoder state to use. |
Returns
| Type | Description |
|---|---|
| Constant | A decoded constant. |
Overrides
Flame.Ir.Codec<Flame.Constant, Loyc.Syntax.LNode>.Decode(Loyc.Syntax.LNode, Flame.Ir.DecoderState)
|
Improve this Doc
View Source
Encode(Constant, EncoderState)
Encodes a constant value.
Declaration
public override LNode Encode(Constant value, EncoderState state)
Parameters
| Type | Name | Description |
|---|---|---|
| Constant | value | The value to encode. |
| EncoderState | state | The encoder state to use. |
Returns
| Type | Description |
|---|---|
| Loyc.Syntax.LNode | An encoded constant value. |
Overrides
Flame.Ir.Codec<Flame.Constant, Loyc.Syntax.LNode>.Encode(Flame.Constant, Flame.Ir.EncoderState)