コード例 #1
0
 public override object VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, object data)
 {
     foreach (var p in anonymousMethodExpression.Parameters)
     {
         AddVariable(p.Type, p.Name,
                     anonymousMethodExpression.StartLocation,
                     anonymousMethodExpression.EndLocation,
                     false, false, null, null, false);
     }
     return(base.VisitAnonymousMethodExpression(anonymousMethodExpression, data));
 }
コード例 #2
0
			public override object Visit (Mono.CSharp.AnonymousMethodExpression anonymousMethodExpression)
			{
				var result = new MonoDevelop.CSharp.Ast.AnonymousMethodExpression ();
				var location = LocationsBag.GetLocations (anonymousMethodExpression);
				if (location != null) {
					result.AddChild (new CSharpTokenNode (Convert (location[0]), "delegate".Length), AssignmentExpression.Roles.Keyword);
					
					if (location.Count > 1) {
						result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AssignmentExpression.Roles.LPar);
						AddParameter (result, anonymousMethodExpression.Parameters);
						result.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AssignmentExpression.Roles.RPar);
					}
				}
				
				result.AddChild ((AstNode)anonymousMethodExpression.Block.Accept (this), AssignmentExpression.Roles.Body);
				return result;
			}
コード例 #3
0
 public virtual S VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, T data)
 {
     return(VisitChildren(anonymousMethodExpression, data));
 }