public TotemContext(ScriptDomainManager manager, IDictionary<string, object> options) : base(manager) { // TODO: parse options // TODO: register event: manager.AssemblyLoaded engine = new TotemEngine(manager.GetLoadedAssemblyList(), manager.Globals); }
public TotemScriptCode( TotemEngine engine, LightExpression<Func<TotemEngine, IDynamicMetaObjectProvider, object>> lambda, SourceUnit sourceUnit) : base(sourceUnit) { this.lambda = lambda; this.engine = engine; }
public TotemConvertBinder(TotemEngine engine, Type type, bool @explicit) : base(type.IsValueType ? typeof(object) : type, @explicit) { this.realType = type; this.engine = engine; this.conversions = new List<KeyValuePair<Type, Convert>>(); if (type == typeof(bool) && !@explicit) RegisterBoolImplicit(); else if (type == typeof(bool)) RegisterBoolExplicit(); }
public TotemUnaryOperationBinder(TotemEngine engine, ExpressionType op) : base(op) { this.unops = new Dictionary<Type, UnaryOperation>(); this.engine = engine; switch (op) { case ExpressionType.Negate: RegisterNegate(); break; case ExpressionType.Increment: RegisterIncrement(); break; } }
public TotemBinaryOperationBinder(TotemEngine engine, ExpressionType op) : base(op) { binops = new Dictionary<TypePair, BinaryOperation>(); this.engine = engine; switch (op) { case ExpressionType.Add: BindAdd(); break; case ExpressionType.Subtract: BindSubtract(); break; case ExpressionType.Multiply: BindMultiply(); break; case ExpressionType.Divide: BindDivide(); break; case ExpressionType.Modulo: BindModulo(); break; case ExpressionType.LessThan: BindLessThan(); break; case ExpressionType.GreaterThan: BindGreaterThan(); break; } }
public TotemGetMemberBinder(TotemEngine engine, string name) : base(name, false) { this.engine = engine; }
public TotemInvokeBinder(TotemEngine engine, CallInfo info) : base(info) { }
public TotemGetIndexBinder(TotemEngine engine, CallInfo info) : base(info) { this.engine = engine; }
private AstGenerator(AnalysisScope.TopLevel global) { this.global = global; this.engine = global.Engine; this.scope = this.function = new AnalysisScope.Function(global, "module", true); }