Table of Contents

Class TryNode

Namespace
EzrSquared.Runtime.Nodes
Assembly
ezrSquared-lib.dll

The Node structure for a try expression.

public record TryNode : Node
Inheritance
object
TryNode
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 Node

The 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 Position

The starting Position of the TryNode.

EndPosition Position

The ending Position of the TryNode.

Properties

Block

The try block.

public Node Block { get; init; }

Property Value

Node

Cases

The error cases of the try expression.

public IReadOnlyCollection<(Node ErrorType, Node? Variable, Node Body)> Cases { get; init; }

Property Value

IReadOnlyCollection<(Node ErrorType, Node Variable, Node Body)>

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; }

Property Value

(Node Variable, Node Body)?