Class ConstantCodec
A codec for constants.
Inherited Members
Namespace: Flame.Ir
Assembly: Flame.Ir.dll
Syntax
public sealed class ConstantCodec : Codec<Constant, LNode>
Fields
| Edit this page View SourceInstance
An instance of the constant codec.
Declaration
public static readonly ConstantCodec Instance
Field Value
| Type | Description |
|---|---|
| ConstantCodec |
Methods
| Edit this page View SourceDecode(LNode, DecoderState)
Decodes an LNode as a constant value.
Declaration
public override Constant Decode(LNode node, DecoderState state)
Parameters
| Type | Name | Description |
|---|---|---|
| LNode | node | The node to decode. |
| DecoderState | state | The decoder state to use. |
Returns
| Type | Description |
|---|---|
| Constant | A decoded constant. |
Overrides
| Edit this page View SourceEncode(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 |
|---|---|
| LNode | An encoded constant value. |