Struct ModuleBlock
- Namespace
- RDCore.SDK.Formatting
- Assembly
- RDCore.SDK.dll
A block of a module that is open at one of its lines: its opener is at or before the line, and the module has no closer for it.
public readonly record struct ModuleBlock : IEquatable<ModuleBlock>
- Implements
- Inherited Members
Constructors
ModuleBlock(int, int, string, bool)
A block of a module that is open at one of its lines: its opener is at or before the line, and the module has no closer for it.
public ModuleBlock(int Opener, int Branch, string Closer, bool HasBody)
Parameters
OpenerintThe line of the block's opener, from 0: its
Sub,Function,Property,EnumorTypeline, or itsIf,Select Case,For,Do,WhileorWithline.BranchintThe line that starts the block's last branch at or before the line: an
ElseIf, anElse, aCaseor aCase Elseline;Openerwhen the block has no branch there.CloserstringThe keywords that close the block:
End Sub,End Function,End Property,End Enum,End Type,End If,End Select,Next,Loop,WendorEnd With.HasBodyboolWhether the line comes after
Branch, so that the block's last branch has a line at or before the line.
Properties
Branch
The line that starts the block's last branch at or before the line: an ElseIf, an Else, a Case or a
Case Else line; Opener when the block has no branch there.
public int Branch { get; init; }
Property Value
Closer
The keywords that close the block: End Sub, End Function, End Property, End Enum, End Type,
End If, End Select, Next, Loop, Wend or End With.
public string Closer { get; init; }
Property Value
HasBody
Whether the line comes after Branch, so that the block's last branch has a line at or before the line.
public bool HasBody { get; init; }
Property Value
Opener
The line of the block's opener, from 0: its Sub, Function, Property, Enum or Type line, or its
If, Select Case, For, Do, While or With line.
public int Opener { get; init; }