parent
ab80d0c269
commit
cff5ec430b
|
@ -1,4 +1,5 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using Canon.Core.Abstractions;
|
||||||
using Canon.Core.CodeGenerators;
|
using Canon.Core.CodeGenerators;
|
||||||
using Canon.Core.Enums;
|
using Canon.Core.Enums;
|
||||||
using Canon.Core.GrammarParser;
|
using Canon.Core.GrammarParser;
|
||||||
|
@ -9,7 +10,7 @@ using Expression = Canon.Core.SyntaxNodes.Expression;
|
||||||
|
|
||||||
namespace Canon.Core.SemanticParser;
|
namespace Canon.Core.SemanticParser;
|
||||||
|
|
||||||
public class CodeGeneratorVisitor : TypeCheckVisitor
|
public class CodeGeneratorVisitor(ICompilerLogger? logger = null) : TypeCheckVisitor(logger)
|
||||||
{
|
{
|
||||||
public CCodeBuilder Builder { get; } = new();
|
public CCodeBuilder Builder { get; } = new();
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class CompilerService(
|
||||||
await using Stream imageStream = syntaxTreePresentationService.Present(root);
|
await using Stream imageStream = syntaxTreePresentationService.Present(root);
|
||||||
string filename = await gridFsService.UploadStream(imageStream, "image/png");
|
string filename = await gridFsService.UploadStream(imageStream, "image/png");
|
||||||
|
|
||||||
CodeGeneratorVisitor visitor = new();
|
CodeGeneratorVisitor visitor = new(compilerLogger);
|
||||||
traveller.Travel(root, visitor);
|
traveller.Travel(root, visitor);
|
||||||
|
|
||||||
CompileResult result = new()
|
CompileResult result = new()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user