Struct IntrinsicNamespace
Represents a namespace of intrinsics.
Inherited Members
Namespace: Flame.Compiler.Instructions
Assembly: Flame.Compiler.dll
Syntax
public struct IntrinsicNamespace
Constructors
| Improve this Doc View SourceIntrinsicNamespace(String)
Creates an intrinsic namespace.
Declaration
public IntrinsicNamespace(string ns)
Parameters
Type | Name | Description |
---|---|---|
System.String | ns | The namespace to manage. |
Properties
| Improve this Doc View SourceNamespace
Gets the name of the namespace of intrinsics.
Declaration
public string Namespace { get; }
Property Value
Type | Description |
---|---|
System.String | The namespace, as a string. |
Methods
| Improve this Doc View SourceGetIntrinsicName(String)
Creates a namespaced intrinsic name from a namespaced operator name.
Declaration
public string GetIntrinsicName(string operatorName)
Parameters
Type | Name | Description |
---|---|---|
System.String | operatorName | The operator name to wrap in a namespaced intrinsic name. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | intrinsicName | The intrinsic name to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
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 |
---|---|
System.Boolean |
|
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. |
System.String | name | The prototype name to expect. |
Returns
Type | Description |
---|---|
System.Boolean |
|
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 |
---|---|---|
System.String | intrinsicName | The namespaced intrinsic name to parse. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | intrinsicName | The intrinsic name to parse. |
System.String | operatorName | The name of the operator specified by the intrinsic, if the intrinsic name is an namespaced intrinsic name. |
Returns
Type | Description |
---|---|
System.Boolean |
|