diff --git a/Canon.Core/SemanticParser/CodeGeneratorVisitor.cs b/Canon.Core/SemanticParser/CodeGeneratorVisitor.cs index 8cb048c..3e58f1c 100644 --- a/Canon.Core/SemanticParser/CodeGeneratorVisitor.cs +++ b/Canon.Core/SemanticParser/CodeGeneratorVisitor.cs @@ -1,4 +1,5 @@ using System.Globalization; +using Canon.Core.Abstractions; using Canon.Core.CodeGenerators; using Canon.Core.Enums; using Canon.Core.GrammarParser; @@ -9,7 +10,7 @@ using Expression = Canon.Core.SyntaxNodes.Expression; namespace Canon.Core.SemanticParser; -public class CodeGeneratorVisitor : TypeCheckVisitor +public class CodeGeneratorVisitor(ICompilerLogger? logger = null) : TypeCheckVisitor(logger) { public CCodeBuilder Builder { get; } = new(); diff --git a/Canon.Server/Services/CompilerService.cs b/Canon.Server/Services/CompilerService.cs index dbb5de9..d469961 100644 --- a/Canon.Server/Services/CompilerService.cs +++ b/Canon.Server/Services/CompilerService.cs @@ -40,7 +40,7 @@ public class CompilerService( await using Stream imageStream = syntaxTreePresentationService.Present(root); string filename = await gridFsService.UploadStream(imageStream, "image/png"); - CodeGeneratorVisitor visitor = new(); + CodeGeneratorVisitor visitor = new(compilerLogger); traveller.Travel(root, visitor); CompileResult result = new()