예제 #1
0
        public List <SymbolInformation> FindSymbols(Workspace w, PTFile file)
        {
            var list = new List <SymbolInformation>();

            foreach (var s in file.Statements)
            {
                s.Accept(this, list);
            }

            return(list);
        }
예제 #2
0
        public NodeFinderResult FindNode(Workspace w, PTFile file, int line, int character, bool exactMatch)
        {
            int index = GetPosition(file.Text, line, character);

            foreach (var s in file.Statements)
            {
                var loc = GetRelativeLocation(s.Location, index);
                if (loc == RelativeLocation.Same)
                {
                    return(s.Accept(this, index));
                }
            }

            return(null);
        }