本文整理汇总了C#中Galaxy_Editor_2.Compiler.Generated.node.Node类的典型用法代码示例。如果您正苦于以下问题:C# Node类的具体用法?C# Node怎么用?C# Node使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Node类属于Galaxy_Editor_2.Compiler.Generated.node命名空间,在下文中一共展示了Node类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReplaceBy
public void ReplaceBy(Node node)
{
if(parent_node != null)
{
parent_node.ReplaceChild(this, node);
}
}
示例2: CloneMethod
public CloneMethod(SharedData data, Dictionary<AALocalDecl, PLvalue> localMap, Node currentCloneNode, ExtraCheckDelegate extraCheck = null)
{
this.data = data;
this.localMap = localMap;
this.currentCloneNode = currentCloneNode;
this.extraCheck = extraCheck;
}
示例3: DefaultIn
public override void DefaultIn(Node node)
{
if (node is PStm)
{
internalAssignments.Clear();
}
base.DefaultIn(node);
}
示例4: Insert
public Node Insert(Node node, AExpStm newStm)
{
//Node must be a node for an AExpStm
Node newNode = new Node(newStm);
foreach (Node successor in node.Successors)
{
newNode.AddSucc(successor);
}
foreach (Node successor in newNode.Successors)
{
node.RemoveSucc(successor);
}
node.AddSucc(newNode);
Nodes.Insert(Nodes.IndexOf(node) + 1, newNode);
return newNode;
}
示例5: DefaultOut
public override void DefaultOut(Node node)
{
if (node is PType)
{
Link((PType) node, node);
}
else if (node is PExp)
{
Link(data.ExpTypes[(PExp) node], node);
}
else if (node is PLvalue && !(node.Parent() is ASyncInvokeExp || node.Parent() is AAsyncInvokeStm))
{
Link(data.LvalueTypes[(PLvalue)node], node);
}
base.DefaultOut(node);
}
示例6: Remove
public void Remove(Node node)
{
Nodes.Remove(node);
//Set succ/pred of succ/pred nodes
foreach (Node predecessor in node.Predecessors)
{
foreach (Node successor in node.Successors)
{
predecessor.AddSucc(successor);
}
}
//Remove node from succ/pred lists
for (int i = node.Predecessors.Count - 1; i >= 0; i--)
{
Node predecessor = node.Predecessors[i];
node.RemovePred(predecessor);
}
for (int i = node.Successors.Count - 1; i >= 0; i--)
{
Node successor = node.Successors[i];
node.RemoveSucc(successor);
}
}
示例7: RemoveChild
internal override void RemoveChild(Node child)
{
if (_token_ == child)
{
_token_ = null;
return;
}
}
示例8: ReplaceChild
internal override void ReplaceChild(Node oldChild, Node newChild)
{
}
示例9: DefaultIn
public override void DefaultIn(Node node)
{
if (node is PStm)
{
safeVariables = new List<VariableDecl>();
PStm prev = GetPrevious((PStm) node);
if (prev != null)
{
safeVariables.AddRange(safeVariablesAfterStatement[prev]);
}
unsafeVariables = new List<VariableDecl>();
}
base.DefaultIn(node);
}