Class TryNode
- Namespace
- EzrSquared.Runtime.Nodes
- Assembly
- ezrSquared-lib.dll
The Node structure for a try expression.
public record TryNode : Node
- Inheritance
-
objectTryNode
- Inherited Members
Constructors
TryNode(Node, IReadOnlyCollection<(Node ErrorType, Node? Variable, Node Body)>, (Node? Variable, Node Body)?, Position, Position)
The Node structure for a try expression.
public TryNode(Node Block, IReadOnlyCollection<(Node ErrorType, Node? Variable, Node Body)> Cases, (Node? Variable, Node Body)? EmptyCase, Position StartPosition, Position EndPosition)
Parameters
Block
NodeThe try block.
Cases
IReadOnlyCollection<(Node ErrorType, Node Variable, Node Body)>The error cases of the try expression.
EmptyCase
(Node Variable, Node Body)?The (optional) Node where the error will be stored and the body of the empty else case.
StartPosition
PositionEndPosition
Position
Properties
Block
The try block.
public Node Block { get; init; }
Property Value
Cases
The error cases of the try expression.
public IReadOnlyCollection<(Node ErrorType, Node? Variable, Node Body)> Cases { get; init; }
Property Value
EmptyCase
The (optional) Node where the error will be stored and the body of the empty else case.
public (Node? Variable, Node Body)? EmptyCase { get; init; }