示例#1
0
        public override bool Walk(ForStatement node)
        {
            var nc = new NameCollectorWalker(_localNames, _localNameNodes);

            node.Left?.Walk(nc);
            return(true);
        }
        private void CollectNames(FunctionDefinition fd)
        {
            var nc = new NameCollectorWalker(_names, _additionalNameNodes);

            foreach (var nex in fd.Parameters.Select(p => p.NameExpression).ExcludeDefault())
            {
                nex.Walk(nc);
            }
        }
示例#3
0
        private void CollectNames(Comprehension c)
        {
            var nc = new NameCollectorWalker(_localNames, _localNameNodes);

            foreach (var cfor in c.Iterators.OfType <ComprehensionFor>())
            {
                cfor.Left?.Walk(nc);
            }
        }
示例#4
0
        private NameCollectorWalker CollectNames(FunctionDefinition fd)
        {
            var nc = new NameCollectorWalker();

            foreach (var nex in fd.Parameters.Select(p => p.NameExpression).ExcludeDefault())
            {
                nex.Walk(nc);
            }
            return(nc);
        }