public void Resolve(ResolveContext ec) { // using (ec.With (ResolveContext.Options.DoFlowAnalysis, true)) { // Keep track of the array initializer, we need it to do array type inference when searching for // a matching method. if (ec.FileType == SourceFileType.PlayScript) { if (Expr is AsArrayInitializer) { InferArrayInitializer = (AsArrayInitializer)Expr; } else if (Expr is AsObjectInitializer) { InferObjInitializer = (AsObjectInitializer)Expr; } else if (Expr is AnonymousMethodExpression) { Expr = new Cast(new TypeExpression(ec.BuiltinTypes.Delegate, Expr.Location), Expr, Expr.Location); } } // Verify that the argument is readable if (ArgType != AType.Out) { Expr = Expr.Resolve(ec); } // Verify that the argument is writeable if (Expr != null && IsByRef) { Expr = Expr.ResolveLValue(ec, EmptyExpression.OutAccess); } if (Expr == null) { Expr = ErrorExpression.Instance; } // } }
public void Resolve (ResolveContext ec) { // using (ec.With (ResolveContext.Options.DoFlowAnalysis, true)) { // Keep track of the array initializer, we need it to do array type inference when searching for // a matching method. if (ec.FileType == SourceFileType.PlayScript) { if (Expr is AsArrayInitializer) { InferArrayInitializer = (AsArrayInitializer)Expr; } else if (Expr is AsObjectInitializer) { InferObjInitializer = (AsObjectInitializer)Expr; } else if (Expr is AnonymousMethodExpression) { Expr = new Cast(new TypeExpression(ec.BuiltinTypes.Delegate, Expr.Location), Expr, Expr.Location); } } // Verify that the argument is readable if (ArgType != AType.Out) Expr = Expr.Resolve (ec); // Verify that the argument is writeable if (Expr != null && IsByRef) Expr = Expr.ResolveLValue (ec, EmptyExpression.OutAccess); if (Expr == null) Expr = ErrorExpression.Instance; // } }
public virtual object Visit (AsArrayInitializer initializer) { return null; }
public virtual object Visit(AsArrayInitializer initializer) { return(null); }