2016-08-07 14:14:08 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using PascalABCCompiler.SyntaxTree;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PascalABCCompiler.SyntaxTreeConverters
|
|
|
|
|
|
{
|
|
|
|
|
|
class StandardSyntaxTreeConverter: ISyntaxTreeConverter
|
|
|
|
|
|
{
|
|
|
|
|
|
public string Name { get; } = "Standard";
|
|
|
|
|
|
public syntax_tree_node Convert(syntax_tree_node root)
|
|
|
|
|
|
{
|
2016-11-15 01:45:41 +03:00
|
|
|
|
FillParentNodeVisitor.New.ProcessNode(root); // прошивание ссылками на Parent nodes. Должно идти первым
|
|
|
|
|
|
StandOutExprWithLambdaInForeachSequenceVisitor.New.ProcessNode(root); // выносим выражения с лямбдами из заголовка foreach
|
|
|
|
|
|
|
2016-08-07 14:14:08 +03:00
|
|
|
|
return root;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|