Пример #1
0
        internal override Expression Resolve(ParserContext parser)
        {
            List <Executable> newCode = new List <Executable>();

            foreach (Executable ex in this.Code)
            {
                newCode.AddRange(ex.Resolve(parser));
            }

            this.Code = Executable.EnsureBlockReturns(newCode.ToArray(), this);

            return(this);
        }
Пример #2
0
        internal override void Resolve(ParserContext parser)
        {
            parser.ValueStackDepth = 0;

            this.FunctionID = parser.GetNextFunctionId();

            for (int i = 0; i < this.DefaultValues.Length; ++i)
            {
                if (this.DefaultValues[i] != null)
                {
                    this.DefaultValues[i] = this.DefaultValues[i].Resolve(parser);
                }
            }

            this.Code = Executable.Resolve(parser, this.Code).ToArray();
            this.Code = Executable.EnsureBlockReturns(this.Code, this);
        }