FindChildrenOf() public static method

public static FindChildrenOf ( Node node, string childNameTree ) : ArrayList
node Node
childNameTree string
return System.Collections.ArrayList
示例#1
0
        public override Node ExitAtom(Production node)
        {
            Token identifier = (Token)GrammaticaNodeUtils.FindChildOf(node, new string[2] {
                "Type", "IDENTIFIER"
            });

            // Adds only globalVars.
            if (identifier != null && !scopeVars.Contains(identifier.GetImage()))
            {
                dependencyGraph.SearchDependant(identifier.GetImage()).AddCallsBy(functionScope);
            }

            ArrayList identifiers = GrammaticaNodeUtils.FindChildrenOf(node, new string[2] {
                "Identifier_Composed_Required", "IDENTIFIER"
            });

            // Adds only globalVars.
            for (int i = 0; i < identifiers.Count; i++)
            {
                if (!scopeVars.Contains(((Token)identifiers[i]).GetImage()))
                {
                    dependencyGraph.SearchDependant(((Token)identifiers[i]).GetImage()).AddCallsBy(functionScope);
                }
            }

            return(node);
        }