public static Vertex localAssign(Graph graph, LocalAsgnNode node) {
return localAssign(graph, node, null);
}
public static Vertex localAssign(Graph graph, LocalAsgnNode node, Vertex src) {
Scope scope = graph.getRuntime().getContext().getCurrentScope();
VertexHolder holder = (VertexHolder) scope.getValue(node.getName());
if (src == null) {
src = graph.createVertex(node.getValueNode());
}
if (holder == null) {
holder = graph.createFreeVertexHolder();
scope.setValue(node.getName(), holder);
}
graph.addEdgeAndPropagate(src, holder.getVertex());
return src;
}