Struct IrCodec
An encoder/decoder for every configurable element of Flame's intermediate representation.
Inherited Members
Namespace: Flame.Ir
Assembly: Flame.Ir.dll
Syntax
public struct IrCodec
Constructors
| Improve this Doc View SourceIrCodec(Codec<Constant, LNode>, Codec<InstructionPrototype, LNode>, Codec<IType, LNode>, Codec<ITypeMember, LNode>, Codec<ITypeMember, LNode>, Codec<IType, LNode>, Codec<IAttribute, LNode>)
Creates a codec for Flame IR from a number of sub-codecs.
Declaration
public IrCodec(Codec<Constant, LNode> constants, Codec<InstructionPrototype, LNode> instructionCodec, Codec<IType, LNode> typeCodec, Codec<ITypeMember, LNode> typeMemberCodec, Codec<ITypeMember, LNode> typeMemberDefinitionCodec, Codec<IType, LNode> typeDefinitionCodec, Codec<IAttribute, LNode> attributeCodec)
Parameters
Type | Name | Description |
---|---|---|
Codec<Constant, Loyc.Syntax.LNode> | constants | A codec for constants. |
Codec<InstructionPrototype, Loyc.Syntax.LNode> | instructionCodec | An instruction prototype codec. |
Codec<IType, Loyc.Syntax.LNode> | typeCodec | A codec for type references. |
Codec<ITypeMember, Loyc.Syntax.LNode> | typeMemberCodec | A codec for type member references. |
Codec<ITypeMember, Loyc.Syntax.LNode> | typeMemberDefinitionCodec | A codec for type member definitions. |
Codec<IType, Loyc.Syntax.LNode> | typeDefinitionCodec | A codec for method definitions. |
Codec<IAttribute, Loyc.Syntax.LNode> | attributeCodec | A codec for attributes. |
Fields
| Improve this Doc View SourceDefault
The default codec for Flame IR as used by unmodified versions of Flame.
Declaration
public static IrCodec Default
Field Value
Type | Description |
---|---|
IrCodec |
Properties
| Improve this Doc View SourceAttributes
Gets the encoder/decoder for attributes.
Declaration
public Codec<IAttribute, LNode> Attributes { get; }
Property Value
Type | Description |
---|---|
Codec<IAttribute, Loyc.Syntax.LNode> | The attribute codec. |
Constants
Gets the encoder for constants.
Declaration
public Codec<Constant, LNode> Constants { get; }
Property Value
Type | Description |
---|---|
Codec<Constant, Loyc.Syntax.LNode> | The constant codec. |
Instructions
Gets the encoder for instruction prototypes.
Declaration
public Codec<InstructionPrototype, LNode> Instructions { get; }
Property Value
Type | Description |
---|---|
Codec<InstructionPrototype, Loyc.Syntax.LNode> | The instruction prototype codec. |
TypeDefinitions
Gets the encoder/decoder for type definitions.
Declaration
public Codec<IType, LNode> TypeDefinitions { get; }
Property Value
Type | Description |
---|---|
Codec<IType, Loyc.Syntax.LNode> | The type definition codec. |
TypeMemberDefinitions
Gets the encoder/decoder for type member definitions.
Declaration
public Codec<ITypeMember, LNode> TypeMemberDefinitions { get; }
Property Value
Type | Description |
---|---|
Codec<ITypeMember, Loyc.Syntax.LNode> | The type member definition codec. |
TypeMembers
Gets the encoder/decoder for type member references.
Declaration
public Codec<ITypeMember, LNode> TypeMembers { get; }
Property Value
Type | Description |
---|---|
Codec<ITypeMember, Loyc.Syntax.LNode> | The type member reference codec. |
Types
Gets the encoder/decoder for type references.
Declaration
public Codec<IType, LNode> Types { get; }
Property Value
Type | Description |
---|---|
Codec<IType, Loyc.Syntax.LNode> | The type reference codec. |
Methods
| Improve this Doc View SourceWithTypes(Codec<IType, LNode>)
Creates an IR codec with a particular type codec. All other fields are copied from this codec.
Declaration
public IrCodec WithTypes(Codec<IType, LNode> typeCodec)
Parameters
Type | Name | Description |
---|---|---|
Codec<IType, Loyc.Syntax.LNode> | typeCodec | A type codec. |
Returns
Type | Description |
---|---|
IrCodec | An IR codec. |