Beispiel #1
0
        protected Engine(BinderFactory factory)
        {
            Contract.Requires<ArgumentNullException>(factory != null);

            Factory = factory;
            Global = new Scope();
            In = Console.In;
            Out = Console.Out;
            DefaultEncoding = Encoding.Default;
        }
        public static Expression<Func<Scope, object>> Generate(Block block, BinderFactory factory, string fileName)
        {
            Contract.Requires<ArgumentNullException>(block != null);
            Contract.Requires<ArgumentNullException>(factory != null);
            Contract.Requires<ArgumentNullException>(fileName != null);

            var global = Expression.Parameter(typeof(Scope), "global");
            var gen = new GlobalGen(fileName, factory, global);
            Expression expr = gen.Generate(block);
            if (expr.Type != typeof(object))
                expr = Expression.Convert(expr, typeof(object));
            return Expression.Lambda<Func<Scope, object>>(expr, "プログラム", new[] { global });
        }
 public KrgnInvokeMemberBinder(string name, CallInfo callInfo, BinderFactory factory)
     : base(name, false, callInfo)
 {
     _factory = factory;
 }
Beispiel #4
0
 public KrgnInvokeMemberBinder(string name, CallInfo callInfo, BinderFactory factory)
     : base(name, false, callInfo)
 {
     _factory = factory;
 }
 public ProduireInvokeMemberBinder(string name, CallInfo callInfo, BinderFactory factory, ReferenceCollection reference)
     : base(name, callInfo, factory)
 {
     _reference = reference;
 }
 // ===== ===== ===== ===== ===== ctor ===== ===== ===== ===== =====
 public GlobalGen(string filename, BinderFactory factory, ParameterExpression global)
 {
     _filename = filename;
     _factory = factory;
     _global = global;
     _docInfo = Expression.SymbolDocument(filename, Engine.Guid);
 }