IsTargetVariable() protected méthode

protected IsTargetVariable ( IVariable variable ) : bool
variable IVariable
Résultat bool
            void CheckVariable(IVariable variable, Statement env)
            {
                if (!issueProvider.IsTargetVariable(variable))
                {
                    return;
                }

                var root      = new Environment(env, env);
                var envLookup = new Dictionary <AstNode, Environment> ();

                envLookup [env] = root;

                FindLocalReferences(variable, (astNode, resolveResult) =>
                                    AddNode(envLookup, new Node(astNode, issueProvider.GetNodeKind(astNode))));

                root.SortChildren();
                CollectIssues(root, variable.Name);
            }
Exemple #2
0
            void CheckVariable(IVariable variable, Statement env)
            {
                if (!issueProvider.IsTargetVariable(variable))
                {
                    return;
                }

                var root      = new Environment(env, env);
                var envLookup = new Dictionary <AstNode, Environment> ();

                envLookup [env] = root;

                foreach (var result in ctx.FindReferences(env, variable))
                {
                    AddNode(envLookup, new Node(result.Node, issueProvider.GetNodeKind(result.Node)));
                }

                root.SortChildren();
                CollectIssues(root, variable.Name);
            }