Struct IntrinsicNamespace
Represents a namespace of intrinsics.
Inherited Members
Namespace: Flame.Compiler.Instructions
Assembly: Flame.Compiler.dll
Syntax
public struct IntrinsicNamespace
Constructors
| Edit this page View SourceIntrinsicNamespace(string)
Creates an intrinsic namespace.
Declaration
public IntrinsicNamespace(string ns)
Parameters
| Type | Name | Description |
|---|---|---|
| string | ns | The namespace to manage. |
Properties
| Edit this page View SourceNamespace
Gets the name of the namespace of intrinsics.
Declaration
public readonly string Namespace { get; }
Property Value
| Type | Description |
|---|---|
| string | The namespace, as a string. |
Methods
| Edit this page View SourceGetIntrinsicName(string)
Creates a namespaced intrinsic name from a namespaced operator name.
Declaration
public string GetIntrinsicName(string operatorName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | operatorName | The operator name to wrap in a namespaced intrinsic name. |
Returns
| Type | Description |
|---|---|
| string | A namespaced intrinsic name. |
IsIntrinsicName(string)
Tests if an intrinsic name is a namespaced intrinsic name.
Declaration
public bool IsIntrinsicName(string intrinsicName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | intrinsicName | The intrinsic name to examine. |
Returns
| Type | Description |
|---|---|
| bool |
|
IsIntrinsicPrototype(InstructionPrototype)
Tests if an instruction prototype is a intrinsic prototype defined in the current namespace.
Declaration
public bool IsIntrinsicPrototype(InstructionPrototype prototype)
Parameters
| Type | Name | Description |
|---|---|---|
| InstructionPrototype | prototype | The prototype to examine. |
Returns
| Type | Description |
|---|---|
| bool |
|
IsIntrinsicPrototype(InstructionPrototype, string)
Tests if an instruction prototype is a intrinsic prototype with a particular name defined in the current namespace.
Declaration
public bool IsIntrinsicPrototype(InstructionPrototype prototype, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| InstructionPrototype | prototype | The prototype to examine. |
| string | name | The prototype name to expect. |
Returns
| Type | Description |
|---|---|
| bool |
|
ParseIntrinsicName(string)
Parses an intrinsic name as a namespaced intrinsic name, assuming that the intrinsic name is a namespaced intrinsic name. Returns the name of the operator wrapped by the namespaced intrinsic name.
Declaration
public string ParseIntrinsicName(string intrinsicName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | intrinsicName | The namespaced intrinsic name to parse. |
Returns
| Type | Description |
|---|---|
| string | The operator name wrapped by the namespaced intrinsic name. |
TryParseIntrinsicName(string, out string)
Tries to parse an intrinsic name as an intrinsic name in this namespace.
Declaration
public bool TryParseIntrinsicName(string intrinsicName, out string operatorName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | intrinsicName | The intrinsic name to parse. |
| string | operatorName | The name of the operator specified by the intrinsic, if the intrinsic name is an namespaced intrinsic name. |
Returns
| Type | Description |
|---|---|
| bool |
|