Class FunctionDefinitionNode
- Namespace
- EzrSquared.Runtime.Nodes
- Assembly
- ezrSquared-lib.dll
The Node structure for a function definition.
public record FunctionDefinitionNode : Node
- Inheritance
-
objectFunctionDefinitionNode
- Inherited Members
Constructors
FunctionDefinitionNode(Node?, AccessMod, bool, IReadOnlyCollection<Node>, Node?, Node?, Node, Position, Position)
The Node structure for a function definition.
public FunctionDefinitionNode(Node? Name, AccessMod AccessibilityModifiers, bool ReturnLast, IReadOnlyCollection<Node> Parameters, Node? ExtraKeywordArguments, Node? ExtraPositionalArguments, Node Body, Position StartPosition, Position EndPosition)
Parameters
NameNodeThe (optional) name of the function.
AccessibilityModifiersAccessModThe accessibility modifiers for the function definition.
ReturnLastboolThe check for if the last expression of the function should be returned as its result. Only used in oneliners.
ParametersIReadOnlyCollection<Node>The parameters of the function.
ExtraKeywordArgumentsNodeThe reference to store the extra keyword arguments in.
ExtraPositionalArgumentsNodeThe reference to store the extra positional arguments in.
BodyNodeThe body of the function.
StartPositionPositionThe starting Position of the FunctionDefinitionNode.
EndPositionPositionThe ending Position of the FunctionDefinitionNode.
Properties
AccessibilityModifiers
The accessibility modifiers for the function definition.
public AccessMod AccessibilityModifiers { get; init; }
Property Value
Body
The body of the function.
public Node Body { get; init; }
Property Value
ExtraKeywordArguments
The reference to store the extra keyword arguments in.
public Node? ExtraKeywordArguments { get; init; }
Property Value
ExtraPositionalArguments
The reference to store the extra positional arguments in.
public Node? ExtraPositionalArguments { get; init; }
Property Value
Name
The (optional) name of the function.
public Node? Name { get; init; }
Property Value
Parameters
The parameters of the function.
public IReadOnlyCollection<Node> Parameters { get; init; }
Property Value
- IReadOnlyCollection<Node>
ReturnLast
The check for if the last expression of the function should be returned as its result. Only used in oneliners.
public bool ReturnLast { get; init; }
Property Value
- bool