Making AST node inmmutable - WIP
This commit is contained in:
@@ -37,7 +37,8 @@ type
|
||||
IAddSeriesItemNode = interface;
|
||||
ISeriesLengthNode = interface;
|
||||
IRecurNode = interface;
|
||||
INopNode = interface; // Added Nop
|
||||
INopNode = interface;
|
||||
IBoundIdentifierNode = interface;
|
||||
|
||||
// Defines the concrete kinds of AST nodes
|
||||
TAstNodeKind = (
|
||||
@@ -65,7 +66,9 @@ type
|
||||
akAddSeriesItem,
|
||||
akSeriesLength,
|
||||
akRecur,
|
||||
akNop // Added Nop
|
||||
akNop,
|
||||
// Internal node produced by compiler
|
||||
akBoundIdentifier
|
||||
);
|
||||
|
||||
// Helper for TAstNodeKind providing a string representation
|
||||
@@ -156,6 +159,8 @@ type
|
||||
function AsRecur: IRecurNode;
|
||||
function AsNop: INopNode; // Added Nop
|
||||
|
||||
function AsBoundIdentifierNode: IBoundIdentifierNode;
|
||||
|
||||
property Kind: TAstNodeKind read GetKind;
|
||||
end;
|
||||
|
||||
@@ -179,6 +184,13 @@ type
|
||||
property Name: string read GetName;
|
||||
end;
|
||||
|
||||
IBoundIdentifierNode = interface(IIdentifierNode)
|
||||
{$region 'private'}
|
||||
function GetAddress: TResolvedAddress;
|
||||
{$endregion}
|
||||
property Address: TResolvedAddress read GetAddress;
|
||||
end;
|
||||
|
||||
// Represents a keyword literal in the AST (e.g., :foo)
|
||||
IKeywordNode = interface(IAstNode)
|
||||
{$region 'private'}
|
||||
|
||||
Reference in New Issue
Block a user