/// <summary> /// Get the list of points to connect to the starting point. /// </summary> /// <returns></returns> public List <Point> GetConnectingPoints() { if (!IsValid) { return(null); } return(LineNodes.Skip(1).ToList()); }
public Point GetStartingPoint() { return(LineNodes.FirstOrDefault()); }
protected override void DoAction(int action) { #pragma warning disable 162, 1522 switch (action) { case 3: // lines -> lines, line, Newline #line 32 "Parser.y" { LineNodes.Add(ValueStack[ValueStack.Depth - 2].LineNode); } #line default break; case 4: // lines -> lines, error, Newline #line 36 "Parser.y" { yyerrok(); } #line default break; case 5: // line -> indents_opt, names #line 43 "Parser.y" { CurrentSemanticValue.LineNode = new LineNode(ValueStack[ValueStack.Depth - 2].IndentsNode, ValueStack[ValueStack.Depth - 1].NamesNode); } #line default break; case 6: // indents_opt -> /* empty */ #line 50 "Parser.y" { CurrentSemanticValue.IndentsNode = null; } #line default break; case 7: // indents_opt -> indents #line 54 "Parser.y" { CurrentSemanticValue.IndentsNode = ValueStack[ValueStack.Depth - 1].IndentsNode; } #line default break; case 8: // indents -> indents, indent #line 61 "Parser.y" { CurrentSemanticValue.IndentsNode = ValueStack[ValueStack.Depth - 2].IndentsNode.AddIndentNode(ValueStack[ValueStack.Depth - 1].IndentNode); } #line default break; case 9: // indents -> indent #line 65 "Parser.y" { CurrentSemanticValue.IndentsNode = new IndentsNode(ValueStack[ValueStack.Depth - 1].IndentNode); } #line default break; case 10: // indent -> Indent #line 72 "Parser.y" { CurrentSemanticValue.IndentNode = new IndentNode(ValueStack[ValueStack.Depth - 1].Indent); } #line default break; case 11: // names -> names, '|', name #line 79 "Parser.y" { CurrentSemanticValue.NamesNode = ValueStack[ValueStack.Depth - 3].NamesNode.AddNameNode(ValueStack[ValueStack.Depth - 1].NameNode); } #line default break; case 12: // names -> name #line 83 "Parser.y" { CurrentSemanticValue.NamesNode = new NamesNode(ValueStack[ValueStack.Depth - 1].NameNode); } #line default break; case 13: // name -> Name #line 90 "Parser.y" { CurrentSemanticValue.NameNode = new NameNode(ValueStack[ValueStack.Depth - 1].Name); } #line default break; } #pragma warning restore 162, 1522 }