Antlr4.Runtime.Tree.Trees.Descendants C# (CSharp) 메소드

Descendants() 공개 정적인 메소드

public static Descendants ( IParseTree t ) : IList
t IParseTree
리턴 IList
        public static IList<IParseTree> Descendants(IParseTree t)
        {
            List<IParseTree> nodes = new List<IParseTree>();
            nodes.Add(t);
            int n = t.ChildCount;
            for (int i = 0; i < n; i++)
            {
                nodes.AddRange(Descendants(t.GetChild(i)));
            }
            return nodes;
        }