}
public static Vertex constDeclaration(Graph graph, ConstDeclNode node, Vertex src) {
RubyModule module = null;
String name = null;
INameNode constNode = (INameNode) node.getConstNode();
if (constNode == null) {
name = node.getName();
module = graph.getRuntime().getContext().getFrameModule();
} else if (constNode instanceof Colon2Node) {
Node leftNode = ((Colon2Node) constNode).getLeftNode();
Vertex v = graph.createVertex(leftNode);
for (IRubyObject mod : v.getTypeSet()) {
if (mod instanceof RubyModule) {
module = (RubyModule) mod;
break;
}
}
name = constNode.getName();
} else { // colon3
module = graph.getRuntime().getObject();
name = constNode.getName();
}
if (src == null) {
src = graph.createVertex(node.getValueNode());
}