Esempio n. 1
0
        public static void AddNewLineObj()
        {
            try
            {
                int    lineNo   = editor.Lines.Length - 1;
                string lineText = editor.Lines[editor.Lines.Length - 2];
                string lineType = "none";

                string token = TokenGenerator.GenerateToken(lineText);
                switch (token)
                {
                case "variableDecleration":
                    lineType = "variable";
                    break;

                case "methodDecleration":
                    lineType = "method";
                    break;

                case "classDecleration":
                    lineType = "class";
                    break;

                default:
                    break;
                }

                LineCollection.Add(new Line()
                {
                    lineNumber = lineNo, text = lineText, type = lineType
                });
            }
            catch (Exception) { }
        }
Esempio n. 2
0
 public static Line GetLastLine()
 {
     return(LineCollection.GetLastLine());
 }