Resolved cyclic dependencies between environment and compiler stages
This commit is contained in:
@@ -12,8 +12,7 @@ uses
|
||||
Myc.Ast.Visitor,
|
||||
Myc.Ast.Scope,
|
||||
Myc.Ast.Types,
|
||||
Myc.Ast,
|
||||
Myc.Ast.Environment;
|
||||
Myc.Ast;
|
||||
|
||||
type
|
||||
IAstMacroExpander = interface(IAstVisitor)
|
||||
@@ -56,6 +55,16 @@ type
|
||||
): IAstNode;
|
||||
end;
|
||||
|
||||
IMacroRegistry = interface
|
||||
{$region 'private'}
|
||||
function GetParent: IMacroRegistry;
|
||||
{$endregion}
|
||||
procedure Define(const Node: IMacroDefinitionNode);
|
||||
function Find(const Name: string): IMacroDefinitionNode;
|
||||
function CreateChildRegistry: IMacroRegistry;
|
||||
property Parent: IMacroRegistry read GetParent;
|
||||
end;
|
||||
|
||||
// Handles the expansion of macro calls within the AST.
|
||||
TMacroExpander = class(TAstTransformer, IAstMacroExpander)
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user