Inheritance: ICSharpCode.NRefactory.Ast.Expression
Example #1
0
	void ArgumentValue(
#line  1416 "cs.ATG" 
out Expression argumentexpr) {

#line  1418 "cs.ATG" 
		Expression expr;
		FieldDirection fd = FieldDirection.None;
		
		if (la.kind == 93 || la.kind == 100) {
			if (la.kind == 100) {
				lexer.NextToken();

#line  1423 "cs.ATG" 
				fd = FieldDirection.Ref; 
			} else {
				lexer.NextToken();

#line  1424 "cs.ATG" 
				fd = FieldDirection.Out; 
			}
		}
		Expr(
#line  1426 "cs.ATG" 
out expr);

#line  1427 "cs.ATG" 
		argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; 
	}
		static InvocationExpression CreateMethodCall(MethodDeclaration method)
		{
			IdentifierExpression wrappedObject = new IdentifierExpression("wrappedObject");
			MemberReferenceExpression methodName = new MemberReferenceExpression(wrappedObject, method.Name);
			InvocationExpression ie = new InvocationExpression(methodName, null);
			foreach (ParameterDeclarationExpression param in method.Parameters) {
				Expression expr = new IdentifierExpression(param.ParameterName);
				if (param.ParamModifier == ParameterModifiers.Ref) {
					expr = new DirectionExpression(FieldDirection.Ref, expr);
				}
				ie.Arguments.Add(expr);
			}
			return ie;
		}
Example #3
0
	void ArgumentValue(
//#line  1396 "cs.ATG" 
out Expression argumentexpr) {

//#line  1398 "cs.ATG" 
		Expression expr;
		FieldDirection fd = FieldDirection.None;
		
		if (la.kind == 93 || la.kind == 100) {
			if (la.kind == 100) {
				lexer.NextToken();

//#line  1403 "cs.ATG" 
				fd = FieldDirection.Ref; 
			} else {
				lexer.NextToken();

//#line  1404 "cs.ATG" 
				fd = FieldDirection.Out; 
			}
		}
		Expr(
//#line  1406 "cs.ATG" 
out expr);

//#line  1407 "cs.ATG" 
		argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; 
	}
Example #4
0
	void Argument(
#line  1392 "Frames/cs.ATG" 
out Expression argumentexpr) {

#line  1394 "Frames/cs.ATG" 
		Expression expr;
		FieldDirection fd = FieldDirection.None;
		
		if (la.kind == 93 || la.kind == 100) {
			if (la.kind == 100) {
				lexer.NextToken();

#line  1399 "Frames/cs.ATG" 
				fd = FieldDirection.Ref; 
			} else {
				lexer.NextToken();

#line  1400 "Frames/cs.ATG" 
				fd = FieldDirection.Out; 
			}
		}
		Expr(
#line  1402 "Frames/cs.ATG" 
out expr);

#line  1403 "Frames/cs.ATG" 
		argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; 
	}
		public override object VisitDirectionExpression(DirectionExpression directionExpression, object data)
		{
			return CreateResolveResult(new ReferenceReturnType(ResolveType(directionExpression.Expression)));
		}
		public virtual object TrackedVisitDirectionExpression(DirectionExpression directionExpression, object data) {
			return base.VisitDirectionExpression(directionExpression, data);
		}
Example #7
0
 public override object VisitDirectionExpression (DirectionExpression directionExpression, object data)
 {
     directionExpression.Expression.AcceptChildren (this, null);
     Console.WriteLine ("Direction Expression, handle this...");
     return null;
 }
Example #8
0
 public virtual object VisitDirectionExpression(DirectionExpression directionExpression, object data)
 {
     Debug.Assert((directionExpression != null));
     Debug.Assert((directionExpression.Expression != null));
     return directionExpression.Expression.AcceptVisitor(this, data);
 }
Example #9
0
	void Argument(
#line  1373 "cs.ATG" 
out Expression argumentexpr) {

#line  1375 "cs.ATG" 
		Expression expr;
		FieldDirection fd = FieldDirection.None;
		
		if (la.kind == 93 || la.kind == 100) {
			if (la.kind == 100) {
				lexer.NextToken();

#line  1380 "cs.ATG" 
				fd = FieldDirection.Ref; 
			} else {
				lexer.NextToken();

#line  1381 "cs.ATG" 
				fd = FieldDirection.Out; 
			}
		}
		Expr(
#line  1383 "cs.ATG" 
out expr);

#line  1384 "cs.ATG" 
		argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; 
	}
 public virtual bool VisitDirectionExpression(DirectionExpression directionExpression, object d)
 {
     if ((directionExpression == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if ((directionExpression.Expression == null)) {
         return SetFailure();
     }
     if(directionExpression.GetType() != d.GetType()) {return SetFailure();}
     var data = (DirectionExpression)d;
     if (!IsMatch(directionExpression, data)) {
         return SetFailure();
     }
     return directionExpression.Expression.AcceptVisitor(this, data.Expression);
 }
 public object VisitDirectionExpression(DirectionExpression directionExpression, object data)
 {
     throw new NotImplementedException ();
 }
Example #12
0
		public override object VisitDirectionExpression(DirectionExpression directionExpression, object data)
		{
			return base.VisitDirectionExpression(directionExpression, data);
		}
 private bool IsMatch(DirectionExpression left, DirectionExpression right)
 {
     return left.FieldDirection == right.FieldDirection;
 }
Example #14
0
 public override object VisitDirectionExpression(DirectionExpression directionExpression, object data)
 {
     directionExpression.Expression.Parent = directionExpression;
     return base.VisitDirectionExpression(directionExpression, data);
 }
Example #15
0
		public virtual object VisitDirectionExpression(DirectionExpression directionExpression, object data) {
			throw new global::System.NotImplementedException("DirectionExpression");
		}
		public virtual object VisitDirectionExpression(DirectionExpression directionExpression, object data) {
			Debug.Assert((directionExpression != null));
			Debug.Assert((directionExpression.Expression != null));
			nodeStack.Push(directionExpression.Expression);
			directionExpression.Expression.AcceptVisitor(this, data);
			directionExpression.Expression = ((Expression)(nodeStack.Pop()));
			return null;
		}
		public sealed override object VisitDirectionExpression(DirectionExpression directionExpression, object data) {
			this.BeginVisit(directionExpression);
			object result = this.TrackedVisitDirectionExpression(directionExpression, data);
			this.EndVisit(directionExpression);
			return result;
		}
Example #18
0
 public virtual object VisitDirectionExpression(DirectionExpression directionExpression, object data) {
     throw CreateException(directionExpression);
 }
 public override object TrackedVisitDirectionExpression(DirectionExpression directionExpression, object data)
 {
     Console.WriteLine("VisitDirectionExpression");
     return null;
 }
		public object VisitDirectionExpression(DirectionExpression directionExpression, object data)
		{
			// boo does not need to specify the direction when calling out/ref methods
			return ConvertExpression(directionExpression.Expression);
		}