Class InstructionSyntax
Represents instruction syntax in CIL assembler
Inherited Members
Namespace: CilTools.Syntax
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public class InstructionSyntax : SyntaxNode
Remarks
The instruction syntax consists of the optional label, operation name, and the optional operand
Properties
Instruction
Returns the instruction instance corresponding to this node
Declaration
public CilInstruction Instruction { get; }
Property Value
Type | Description |
---|---|
CilInstruction |
Label
Gets the label name of this instruction
Declaration
public string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
OperandString
Gets the text representation of this instruction's operand
Declaration
public string OperandString { get; }
Property Value
Type | Description |
---|---|
System.String |
OperandSyntax
Gets the collection of nodes representing this instruction operand's syntax
Declaration
public IEnumerable<SyntaxNode> OperandSyntax { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SyntaxNode> |
Operation
Gets the operation name of this instruction
Declaration
public string Operation { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
EnumerateChildNodes()
Enumerates child nodes of this node. For the leaf node, returns an empty collection.
Declaration
public override IEnumerable<SyntaxNode> EnumerateChildNodes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SyntaxNode> | The collection of child syntax nodes |
Overrides
ToText(TextWriter)
Writes text representation of this node into the specified TextWriter
Declaration
public override void ToText(TextWriter target)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | target |
Overrides
WriteLabel(TextWriter)
Writes the label name of this instruction into the specified TextWriter
Declaration
public void WriteLabel(TextWriter target)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | target |
WriteOperand(TextWriter)
Writes the operand of this instruction into the specified TextWriter
Declaration
public void WriteOperand(TextWriter target)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | target |
WriteOperation(TextWriter)
Writes the operation name of this instruction into the specified TextWriter
Declaration
public void WriteOperation(TextWriter target)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | target |