Antlr4.Runtime.Tree.Pattern.ParseTreePattern.FindAll C# (CSharp) 메소드

FindAll() 개인적인 메소드

private FindAll ( IParseTree tree, string xpath ) : IList
tree IParseTree
xpath string
리턴 IList
        public virtual IList<ParseTreeMatch> FindAll(IParseTree tree, string xpath)
        {
            ICollection<IParseTree> subtrees = XPath.FindAll(tree, xpath, matcher.Parser);
            IList<ParseTreeMatch> matches = new List<ParseTreeMatch>();
            foreach (IParseTree t in subtrees)
            {
                ParseTreeMatch match = Match(t);
                if (match.Succeeded)
                {
                    matches.Add(match);
                }
            }
            return matches;
        }