Class BlockSyntax
Represents the block syntax in the CIL assembler. The block contains child directive and instruction nodes.
Inherited Members
Namespace: CilTools.Syntax
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public class BlockSyntax : SyntaxNode
Remarks
The examples of block syntax are method body or exception handler blocks. The block consists of the optional header, opening curly brace, content nodes (directives and statements) and closing curly brace.
Properties
Content
Returns the collection of the syntax nodes contained within this block (content nodes)
Declaration
public IEnumerable<SyntaxNode> Content { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SyntaxNode> |
Remarks
The content nodes are located between opening and closing curly braces. They include instructions and directives.
HeaderSyntax
Gets the header syntax of this block, or an empty collection if this block has no header
Declaration
public IEnumerable<SyntaxNode> HeaderSyntax { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SyntaxNode> |
Remarks
For the exception handler blocks, the header represents the exception clause. Other types of blocks does not have headers.
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 |