2016-08-28 21:11:34 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PascalABCCompiler.SyntaxTree
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FillParentNodeVisitor: CollectUpperNodesVisitor
|
|
|
|
|
|
{
|
|
|
|
|
|
public static FillParentNodeVisitor New
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return new FillParentNodeVisitor();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public override void Enter(syntax_tree_node st)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Enter(st);
|
2016-10-13 00:56:12 +03:00
|
|
|
|
st.Parent = UpperNode();
|
2016-08-28 21:11:34 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|