Fixed macro expansion

This commit is contained in:
Michael Schimmel
2025-11-05 10:03:27 +01:00
parent 980919525b
commit edd3e83377
4 changed files with 7 additions and 105 deletions
-7
View File
@@ -51,7 +51,6 @@ type
function VisitKeyword(const Node: IKeywordNode): IAstNode; override;
// Compile-time nodes (should not be present)
function VisitMacroExpansionNode(const Node: IMacroExpansionNode): IAstNode; override;
function VisitMacroDefinition(const Node: IMacroDefinitionNode): IAstNode; override;
public
constructor Create(const ADescriptor: IScopeDescriptor);
@@ -148,12 +147,6 @@ begin
raise Exception.Create('TTypeChecker: MacroDefinition node encountered.');
end;
function TTypeChecker.VisitMacroExpansionNode(const Node: IMacroExpansionNode): IAstNode;
begin
// TypeChecker runs *after* expansion, so we just visit the body.
Result := Accept(Node.ExpandedBody);
end;
function TTypeChecker.VisitVariableDeclaration(const Node: IVariableDeclarationNode): IAstNode;
var
initType: IStaticType;