Exemplo n.º 1
0
        protected override void compile(Context ctx, bool mustReturn)
        {
            var name = LocalName ?? ctx.CurrentScope.FindName(Name);
            if (name.IsConstant && name.IsImmutable && ctx.Options.UnrollConstants)
                return;

            if (Value == null)
                Value = Expr.Default(Type);

            var assignNode = new SetIdentifierNode
            {
                Identifier = Name,
                LocalName = LocalName,
                Value = Value,
                IsInitialization = true,
            };

            assignNode.Compile(ctx, mustReturn);
        }