pascalabcnet/Yield/YieldConversionSyntax/YieldDesugarSyntaxTreeConverter.cs
miks1965 5e4b3e032d a.Rows a.Cols для матриц
Drawman - увеличена толщина линий
StandOutExprWithLambdaInForeachSequenceVisitor
2016-11-15 01:45:41 +03:00

40 lines
890 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PascalABCCompiler;
using PascalABCCompiler.SyntaxTree;
using PascalABCCompiler.Errors;
using SyntaxVisitors;
using PascalABCCompiler.SyntaxTreeConverters;
namespace YieldDesugarSyntaxTreeConverter
{
public class YieldDesugarSyntaxTreeConverter : ISyntaxTreeConverter
{
public string Name { get; } = "YieldDesugar";
public syntax_tree_node Convert(syntax_tree_node root)
{
root.visit(new MarkMethodHasYieldAndCheckSomeErrorsVisitor());
ProcessYieldCapturedVarsVisitor.New.ProcessNode(root);
#if DEBUG
try
{
//root.visit(new SimplePrettyPrinterVisitor(@"d:\\zzz1.txt"));
}
catch
{
}
#endif
return root;
}
}
}