Canon/Canon.Core/SemanticParser/CCodeGenerateVisitor.cs

18 lines
431 B
C#
Raw Normal View History

using Canon.Core.CodeGenerators;
using Canon.Core.SyntaxNodes;
namespace Canon.Core.SemanticParser;
public class CCodeGenerateVisitor : TypeCheckVisitor
{
public CCodeBuilder Builder { get; } = new();
public override void PreVisit(ProgramStruct programStruct)
{
base.PreVisit(programStruct);
Builder.AddString("#include <stdbool.h>\n");
Builder.AddString("#include <stdio.h>\n");
}
}