getForwarding() public method

public getForwarding ( ) : State
return State
Beispiel #1
0
        public DataType VisitLambda(Lambda lambda)
        {
            State env = scope.getForwarding();
            var   fun = new FunType(lambda, env);

            fun.Table.Parent = this.scope;
            fun.Table.Path   = scope.extendPath(analyzer, "{lambda}");
            fun.setDefaultTypes(ResolveList(lambda.args.Select(p => p.test)));
            analyzer.AddUncalled(fun);
            return(fun);
        }
Beispiel #2
0
        public State(State parent, StateType type)
        {
            this.Parent    = parent;
            this.stateType = type;
            this.Path      = "";

            if (type == StateType.CLASS)
            {
                this.Forwarding = parent == null ? null : parent.getForwarding();
            }
            else
            {
                this.Forwarding = this;
            }
        }
Beispiel #3
0
        private static ISet<State> looked = new HashSet<State>(); // circularity prevention

        #endregion Fields

        #region Constructors

        public State(State parent, StateType type)
        {
            this.Parent = parent;
            this.stateType = type;
            this.Path = "";

            if (type == StateType.CLASS)
            {
                this.Forwarding = parent == null ? null : parent.getForwarding();
            }
            else
            {
                this.Forwarding = this;
            }
        }