fix: 前端的日志输出 (#81)

Reviewed-on: PostGuard/Canon#81
This commit is contained in:
jackfiled 2024-05-12 22:36:17 +08:00
parent ab80d0c269
commit cff5ec430b
2 changed files with 3 additions and 2 deletions

View File

@ -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();

View File

@ -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()