Beispiel #1
0
        protected override void DoEmit()
        {
            var resolveResult = this.Emitter.Resolver.ResolveNode(this.DefaultValueExpression.Type, this.Emitter);
            var value         = DefaultValueBlock.DefaultValue(resolveResult, this.Emitter, DefaultValueExpression.Type);

            this.Write(value);
        }
Beispiel #2
0
        private string MakeConstant(ResolveResult rr)
        {
            var value = rr.ConstantValue == null?DefaultValueBlock.DefaultValue(rr, this._emitter) : AbstractEmitterBlock.ToJavaScript(rr.ConstantValue, this._emitter);

            return(CompileFactoryCall("Constant", new[] { typeof(object), typeof(Type) }, new[] { value, ExpressionTreeBuilder.GetTypeName(rr.Type, this._emitter) }));
        }