コード例 #1
0
        protected IVariable getVar(VariableReference varRef)
        {
            var v = varRef.getVariable();

            if (v.mutability == null)
            {
                v.mutability = new MutabilityInfo(true, false, false);
            }
            return(v);
        }
コード例 #2
0
        protected override VariableReference visitVariableReference(VariableReference varRef)
        {
            if (varRef is StaticFieldReference statFieldRef || varRef is InstanceFieldReference || varRef is StaticPropertyReference || varRef is InstancePropertyReference || this.scopeVars == null)
            {
                return(varRef);
            }

            var vari = varRef.getVariable();

            if (!this.scopeVars.has(vari))
            {
                this.capturedVars.add(vari);
            }

            return(varRef);
        }