示例#1
0
        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));
        }
示例#2
0
        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;
        }