private static void GenerateEdgeCode(String graphName, DotEdge edge, ArrayList<String> drawingCode) { var attributesCode = GenerateAttributeCode (edge.Attributes); drawingCode.Push (String.Format ("{0}.addEdge(\"{1}\", \"{2}\", {3});", graphName, edge.FromNodeId, edge.ToNodeId, attributesCode)); }
private DotEdge ParseEdge(String fromNodeId) { DotEdge edge = null; if (lookahead.TokenType == TokenType.EDGE) { expect (TokenType.EDGE); var toNodeId = lookahead.Value; expect (TokenType.ID); edge = new DotEdge (fromNodeId, toNodeId); } return edge; }