private static List <IntermediateCode> GenerateIntermediateCode(ICodeUnit ast) { var generator = new IntermediateCodeGenerator(); var codes = generator.Generate(ast).ToList(); return(codes); }
private static IReadOnlyCollection <IntermediateCode> Generate(ICodeUnit unit) { var sut = new IntermediateCodeGenerator(); var actual = sut.Generate(unit); var namer = new ImplicitReferenceNameAssigner(); namer.AssignNames(unit); return(actual.ToList().AsReadOnly()); }