Inheritance: ICSharpCode.NRefactory.Ast.Expression
コード例 #1
0
		public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
		{
			ResolveResult targetRR = Resolve(pointerReferenceExpression.TargetObject);
			if (targetRR == null || targetRR.ResolvedType == null)
				return null;
			PointerReturnType type = targetRR.ResolvedType.CastToDecoratingReturnType<PointerReturnType>();
			if (type != null) {
				return resolver.ResolveMember(type.BaseType, pointerReferenceExpression.MemberName,
				                              pointerReferenceExpression.TypeArguments,
				                              NRefactoryResolver.IsInvoked(pointerReferenceExpression),
				                              true, null
				                             );
			}
			return null;
		}
コード例 #2
0
ファイル: Parser.cs プロジェクト: pluraldj/SharpDevelop
	void PointerMemberAccess(
#line  2053 "cs.ATG" 
out Expression expr, Expression target) {

#line  2054 "cs.ATG" 
		List<TypeReference> typeList; 
		Expect(47);
		Identifier();

#line  2058 "cs.ATG" 
		expr = new PointerReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation; 
		if (
#line  2059 "cs.ATG" 
IsGenericInSimpleNameOrMemberAccess()) {
			TypeArgumentList(
#line  2060 "cs.ATG" 
out typeList, false);

#line  2061 "cs.ATG" 
			((MemberReferenceExpression)expr).TypeArguments = typeList; 
		}
	}
コード例 #3
0
		public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			Debug.Assert((pointerReferenceExpression != null));
			Debug.Assert((pointerReferenceExpression.TargetObject != null));
			Debug.Assert((pointerReferenceExpression.TypeArguments != null));
			nodeStack.Push(pointerReferenceExpression.TargetObject);
			pointerReferenceExpression.TargetObject.AcceptVisitor(this, data);
			pointerReferenceExpression.TargetObject = ((Expression)(nodeStack.Pop()));
			for (int i = 0; i < pointerReferenceExpression.TypeArguments.Count; i++) {
				TypeReference o = pointerReferenceExpression.TypeArguments[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (TypeReference)nodeStack.Pop();
				if (o == null)
					pointerReferenceExpression.TypeArguments.RemoveAt(i--);
				else
					pointerReferenceExpression.TypeArguments[i] = o;
			}
			return null;
		}
コード例 #4
0
ファイル: JsVisitor.cs プロジェクト: hallvar/Joddes.CS
 public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
     throw CreateException(pointerReferenceExpression);
 }
コード例 #5
0
		public object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
		{
			AddError(pointerReferenceExpression, "Pointers are not supported.");
			return null;
		}
コード例 #6
0
ファイル: AbstractASTVisitor.cs プロジェクト: pusp/o2platform
 public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     Debug.Assert((pointerReferenceExpression != null));
     Debug.Assert((pointerReferenceExpression.TargetObject != null));
     Debug.Assert((pointerReferenceExpression.TypeArguments != null));
     pointerReferenceExpression.TargetObject.AcceptVisitor(this, data);
     foreach (TypeReference o in pointerReferenceExpression.TypeArguments) {
         Debug.Assert(o != null);
         o.AcceptVisitor(this, data);
     }
     return null;
 }
コード例 #7
0
ファイル: Program.cs プロジェクト: kingjiang/SharpDevelopLite
		public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
		{
			pointerReferenceExpression.MemberName = pointerReferenceExpression.MemberName.Replace("32", "64");
			return base.VisitPointerReferenceExpression(pointerReferenceExpression, data);
		}
コード例 #8
0
		public sealed override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			this.BeginVisit(pointerReferenceExpression);
			object result = this.TrackedVisitPointerReferenceExpression(pointerReferenceExpression, data);
			this.EndVisit(pointerReferenceExpression);
			return result;
		}
コード例 #9
0
		public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
		{
			return base.VisitPointerReferenceExpression(pointerReferenceExpression, data);
		}
コード例 #10
0
ファイル: Parser.cs プロジェクト: Adam-Fogle/agentralphplugin
	void PointerMemberAccess(
#line  1970 "cs.ATG" 
out Expression expr, Expression target) {

#line  1971 "cs.ATG" 
		List<TypeReference> typeList; 
		Expect(47);
		Identifier();

#line  1975 "cs.ATG" 
		expr = new PointerReferenceExpression(target, t.val); 
		if (
#line  1976 "cs.ATG" 
IsGenericInSimpleNameOrMemberAccess()) {
			TypeArgumentList(
#line  1977 "cs.ATG" 
out typeList, false);

#line  1978 "cs.ATG" 
			((MemberReferenceExpression)expr).TypeArguments = typeList; 
		}
	}
コード例 #11
0
		public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			Debug.Assert((pointerReferenceExpression != null));
			Debug.Assert((pointerReferenceExpression.TargetObject != null));
			return pointerReferenceExpression.TargetObject.AcceptVisitor(this, data);
		}
コード例 #12
0
 private bool IsMatch(PointerReferenceExpression left, PointerReferenceExpression data)
 {
     return false;
 }
コード例 #13
0
		public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
		{
			return null;
			/*
			ReturnType type = pointerReferenceExpression.TargetObject.AcceptVisitor(this, data) as ReturnType;
			if (type == null) {
				return null;
			}
			type = type.Clone();
			--type.PointerNestingLevel;
			if (type.PointerNestingLevel != 0) {
				return null;
			}
			return resolver.SearchMember(type, pointerReferenceExpression.Identifier);
			 */
		}
コード例 #14
0
		public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			throw new global::System.NotImplementedException("PointerReferenceExpression");
		}
コード例 #15
0
 public virtual bool VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object d)
 {
     if ((pointerReferenceExpression == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if ((pointerReferenceExpression.TargetObject == null)) {
         return SetFailure();
     }
     if ((pointerReferenceExpression.TypeArguments == null)) {
         return SetFailure();
     }
     if(pointerReferenceExpression.GetType() != d.GetType()) {return SetFailure();}
     var data = (PointerReferenceExpression)d;
     if (!IsMatch(pointerReferenceExpression, data)) {
         return SetFailure();
     }
     pointerReferenceExpression.TargetObject.AcceptVisitor(this, data.TargetObject);
     if (pointerReferenceExpression.TypeArguments.Count == data.TypeArguments.Count) {
     for (int i=0; i<pointerReferenceExpression.TypeArguments.Count;i++) {
         TypeReference o = pointerReferenceExpression.TypeArguments[i];
         if(o == null){return SetFailure();}
         if((bool)o.AcceptVisitor(this, data.TypeArguments[i]) == false) return SetFailure();
     }			}			else { return SetFailure(); }
     return true;
 }
コード例 #16
0
		public virtual object TrackedVisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			return base.VisitPointerReferenceExpression(pointerReferenceExpression, data);
		}
コード例 #17
0
 public object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     throw new NotImplementedException ();
 }
コード例 #18
0
 public override object TrackedVisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     Console.WriteLine("VisitPointerReferenceExpression");
     return null;
 }
コード例 #19
0
		public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			Debug.Assert((pointerReferenceExpression != null));
			Debug.Assert((pointerReferenceExpression.TargetObject != null));
			nodeStack.Push(pointerReferenceExpression.TargetObject);
			pointerReferenceExpression.TargetObject.AcceptVisitor(this, data);
			pointerReferenceExpression.TargetObject = ((Expression)(nodeStack.Pop()));
			return null;
		}