Beispiel #1
0
        protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
        {
            PointerReferenceExpression o = other as PointerReferenceExpression;

            return(o != null && MatchString(this.MemberName, o.MemberName) && this.TypeArguments.DoMatch(o.TypeArguments, match));
        }
        /*
         * public override void VisitParenthesizedExpression (ParenthesizedExpression parenthesizedExpression)
         * {
         * }*/

        public override void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
        {
            throw NotSupportedToConsistency();
        }
 public object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     AddError(pointerReferenceExpression, "Pointers are not supported.");
     return(null);
 }
		public sealed override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			BeginVisit(pointerReferenceExpression);
			object result = TrackedVisitPointerReferenceExpression(pointerReferenceExpression, data);
			EndVisit(pointerReferenceExpression);
			return result;
		}
 public override void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     pointerReferenceExpression.Target.AcceptVisitor(this);
 }
 public override void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     ForceSpacesAround(pointerReferenceExpression.ArrowToken, policy.SpaceAroundUnsafeArrowOperator);
     base.VisitPointerReferenceExpression(pointerReferenceExpression);
 }
Beispiel #7
0
			public override object Visit(MemberAccess memberAccess)
			{
				Expression result;
				var ind = memberAccess.LeftExpression as Indirection;
				if (ind != null) {
					result = new PointerReferenceExpression();
					result.AddChild((Expression)ind.Expr.Accept(this), Roles.TargetExpression);
					result.AddChild(new CSharpTokenNode(Convert(ind.Location), PointerReferenceExpression.ArrowRole), PointerReferenceExpression.ArrowRole);
				} else {
					result = new MemberReferenceExpression();
					if (memberAccess.LeftExpression != null) {
						var leftExpr = memberAccess.LeftExpression.Accept(this);
						result.AddChild((Expression)leftExpr, Roles.TargetExpression);
					}
					var loc = LocationsBag.GetLocations(memberAccess);

					if (loc != null) {
						result.AddChild(new CSharpTokenNode(Convert(loc [0]), Roles.Dot), Roles.Dot);
					}
				}
				
				result.AddChild(Identifier.Create(memberAccess.Name, Convert(memberAccess.Location)), Roles.Identifier);
				
				AddTypeArguments(result, memberAccess);
				return result;
			}
		public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			throw new global::System.NotImplementedException("PointerReferenceExpression");
		}
Beispiel #9
0
 public StringBuilder VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, int data)
 {
     throw new ASLException("ASL does not have pointers.");
 }
Beispiel #10
0
 public RedILNode VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, State data)
 {
     throw new System.NotImplementedException();
 }
		public override bool VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
		{
			base.VisitPointerReferenceExpression(pointerReferenceExpression);
			return true;
		}
Beispiel #12
0
        private void PrimaryExpr(out Expression pexpr)
        {
            TypeReference typeReference = null;
            List<TypeReference> types = null;
            Expression expression;
            bool flag = false;
            pexpr = null;
            if (this.la.kind == 0x70)
            {
                base.lexer.NextToken();
                pexpr = new PrimitiveExpression(true, "true");
            }
            else if (this.la.kind == 0x47)
            {
                base.lexer.NextToken();
                pexpr = new PrimitiveExpression(false, "false");
            }
            else if (this.la.kind == 0x59)
            {
                base.lexer.NextToken();
                pexpr = new PrimitiveExpression(null, "null");
            }
            else if (this.la.kind == 2)
            {
                base.lexer.NextToken();
                pexpr = new PrimitiveExpression(this.t.literalValue, this.t.val);
            }
            else if ((this.la.kind == 1) && (this.Peek(1).kind == 10))
            {
                base.Expect(1);
                typeReference = new TypeReference(this.t.val);
                base.Expect(10);
                pexpr = new TypeReferenceExpression(typeReference);
                base.Expect(1);
                if (typeReference.Type == "global")
                {
                    typeReference.IsGlobal = true;
                    typeReference.Type = this.t.val ?? "?";
                }
                else
                {
                    typeReference.Type = typeReference.Type + "." + (this.t.val ?? "?");
                }
            }
            else if (this.la.kind == 1)
            {
                base.lexer.NextToken();
                pexpr = new IdentifierExpression(this.t.val);
            }
            else if (this.la.kind == 20)
            {
                base.lexer.NextToken();
                this.Expr(out expression);
                base.Expect(0x15);
                pexpr = new ParenthesizedExpression(expression);
            }
            else if (!this.StartOf(0x1a))
            {
                if (this.la.kind == 110)
                {
                    base.lexer.NextToken();
                    pexpr = new ThisReferenceExpression();
                }
                else if (this.la.kind == 50)
                {
                    base.lexer.NextToken();
                    Expression targetObject = new BaseReferenceExpression();
                    if (this.la.kind == 15)
                    {
                        base.lexer.NextToken();
                        base.Expect(1);
                        targetObject = new FieldReferenceExpression(targetObject, this.t.val);
                    }
                    else if (this.la.kind == 0x12)
                    {
                        base.lexer.NextToken();
                        this.Expr(out expression);
                        List<Expression> indices = new List<Expression>();
                        if (expression != null)
                        {
                            indices.Add(expression);
                        }
                        while (this.la.kind == 14)
                        {
                            base.lexer.NextToken();
                            this.Expr(out expression);
                            if (expression != null)
                            {
                                indices.Add(expression);
                            }
                        }
                        base.Expect(0x13);
                        targetObject = new IndexerExpression(targetObject, indices);
                    }
                    else
                    {
                        base.SynErr(0xb3);
                    }
                    pexpr = targetObject;
                }
                else if (this.la.kind == 0x58)
                {
                    base.lexer.NextToken();
                    this.NonArrayType(out typeReference);
                    List<Expression> parameters = new List<Expression>();
                    if (this.la.kind == 20)
                    {
                        base.lexer.NextToken();
                        ObjectCreateExpression expression3 = new ObjectCreateExpression(typeReference, parameters);
                        if (this.StartOf(0x15))
                        {
                            this.Argument(out expression);
                            if (expression != null)
                            {
                                parameters.Add(expression);
                            }
                            while (this.la.kind == 14)
                            {
                                base.lexer.NextToken();
                                this.Argument(out expression);
                                if (expression != null)
                                {
                                    parameters.Add(expression);
                                }
                            }
                        }
                        base.Expect(0x15);
                        pexpr = expression3;
                    }
                    else if (this.la.kind == 0x12)
                    {
                        base.lexer.NextToken();
                        flag = true;
                        ArrayCreateExpression expression4 = new ArrayCreateExpression(typeReference);
                        pexpr = expression4;
                        int item = 0;
                        List<int> list4 = new List<int>();
                        if ((this.la.kind == 14) || (this.la.kind == 0x13))
                        {
                            while (this.la.kind == 14)
                            {
                                base.lexer.NextToken();
                                item++;
                            }
                            base.Expect(0x13);
                            list4.Add(item);
                            item = 0;
                            while (this.la.kind == 0x12)
                            {
                                base.lexer.NextToken();
                                while (this.la.kind == 14)
                                {
                                    base.lexer.NextToken();
                                    item++;
                                }
                                base.Expect(0x13);
                                list4.Add(item);
                                item = 0;
                            }
                            expression4.CreateType.RankSpecifier = list4.ToArray();
                            this.ArrayInitializer(out expression);
                            expression4.ArrayInitializer = (ArrayInitializerExpression) expression;
                        }
                        else if (this.StartOf(5))
                        {
                            this.Expr(out expression);
                            if (expression != null)
                            {
                                parameters.Add(expression);
                            }
                            while (this.la.kind == 14)
                            {
                                base.lexer.NextToken();
                                item++;
                                this.Expr(out expression);
                                if (expression != null)
                                {
                                    parameters.Add(expression);
                                }
                            }
                            base.Expect(0x13);
                            list4.Add(item);
                            expression4.Arguments = parameters;
                            for (item = 0; this.la.kind == 0x12; item = 0)
                            {
                                base.lexer.NextToken();
                                while (this.la.kind == 14)
                                {
                                    base.lexer.NextToken();
                                    item++;
                                }
                                base.Expect(0x13);
                                list4.Add(item);
                            }
                            expression4.CreateType.RankSpecifier = list4.ToArray();
                            if (this.la.kind == 0x10)
                            {
                                this.ArrayInitializer(out expression);
                                expression4.ArrayInitializer = (ArrayInitializerExpression) expression;
                            }
                        }
                        else
                        {
                            base.SynErr(180);
                        }
                    }
                    else
                    {
                        base.SynErr(0xb5);
                    }
                }
                else if (this.la.kind == 0x72)
                {
                    base.lexer.NextToken();
                    base.Expect(20);
                    if (this.NotVoidPointer())
                    {
                        base.Expect(0x7a);
                        typeReference = new TypeReference("void");
                    }
                    else if (this.StartOf(9))
                    {
                        this.TypeWithRestriction(out typeReference, true, true);
                    }
                    else
                    {
                        base.SynErr(0xb6);
                    }
                    base.Expect(0x15);
                    pexpr = new TypeOfExpression(typeReference);
                }
                else if ((this.la.kind == 0x3e) && (this.Peek(1).kind == 20))
                {
                    base.Expect(0x3e);
                    base.Expect(20);
                    this.Type(out typeReference);
                    base.Expect(0x15);
                    pexpr = new DefaultValueExpression(typeReference);
                }
                else if (this.la.kind == 0x68)
                {
                    base.lexer.NextToken();
                    base.Expect(20);
                    this.Type(out typeReference);
                    base.Expect(0x15);
                    pexpr = new SizeOfExpression(typeReference);
                }
                else if (this.la.kind == 0x39)
                {
                    base.lexer.NextToken();
                    base.Expect(20);
                    this.Expr(out expression);
                    base.Expect(0x15);
                    pexpr = new CheckedExpression(expression);
                }
                else if (this.la.kind == 0x75)
                {
                    base.lexer.NextToken();
                    base.Expect(20);
                    this.Expr(out expression);
                    base.Expect(0x15);
                    pexpr = new UncheckedExpression(expression);
                }
                else if (this.la.kind == 0x3f)
                {
                    base.lexer.NextToken();
                    this.AnonymousMethodExpr(out expression);
                    pexpr = expression;
                }
                else
                {
                    base.SynErr(0xb7);
                }
            }
            else
            {
                string typeName = null;
                switch (this.la.kind)
                {
                    case 0x3d:
                        base.lexer.NextToken();
                        typeName = "decimal";
                        break;

                    case 0x41:
                        base.lexer.NextToken();
                        typeName = "double";
                        break;

                    case 0x4a:
                        base.lexer.NextToken();
                        typeName = "float";
                        break;

                    case 0x33:
                        base.lexer.NextToken();
                        typeName = "bool";
                        break;

                    case 0x35:
                        base.lexer.NextToken();
                        typeName = "byte";
                        break;

                    case 0x38:
                        base.lexer.NextToken();
                        typeName = "char";
                        break;

                    case 0x51:
                        base.lexer.NextToken();
                        typeName = "int";
                        break;

                    case 0x56:
                        base.lexer.NextToken();
                        typeName = "long";
                        break;

                    case 90:
                        base.lexer.NextToken();
                        typeName = "object";
                        break;

                    case 0x65:
                        base.lexer.NextToken();
                        typeName = "sbyte";
                        break;

                    case 0x67:
                        base.lexer.NextToken();
                        typeName = "short";
                        break;

                    case 0x6b:
                        base.lexer.NextToken();
                        typeName = "string";
                        break;

                    case 0x73:
                        base.lexer.NextToken();
                        typeName = "uint";
                        break;

                    case 0x74:
                        base.lexer.NextToken();
                        typeName = "ulong";
                        break;

                    case 0x77:
                        base.lexer.NextToken();
                        typeName = "ushort";
                        break;
                }
                this.t.val = "";
                base.Expect(15);
                base.Expect(1);
                pexpr = new FieldReferenceExpression(new TypeReferenceExpression(typeName), this.t.val);
            }
            while ((this.StartOf(0x1b) || (this.IsGenericFollowedBy(15) && this.IsTypeReferenceExpression(pexpr))) || this.IsGenericFollowedBy(20))
            {
                if ((this.la.kind == 0x1f) || (this.la.kind == 0x20))
                {
                    if (this.la.kind == 0x1f)
                    {
                        base.lexer.NextToken();
                        pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement);
                    }
                    else if (this.la.kind == 0x20)
                    {
                        base.lexer.NextToken();
                        pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement);
                    }
                    else
                    {
                        base.SynErr(0xb8);
                    }
                }
                else
                {
                    if (this.la.kind == 0x2f)
                    {
                        base.lexer.NextToken();
                        base.Expect(1);
                        pexpr = new PointerReferenceExpression(pexpr, this.t.val);
                        continue;
                    }
                    if (this.la.kind == 15)
                    {
                        base.lexer.NextToken();
                        base.Expect(1);
                        pexpr = new FieldReferenceExpression(pexpr, this.t.val);
                        continue;
                    }
                    if (this.IsGenericFollowedBy(15) && this.IsTypeReferenceExpression(pexpr))
                    {
                        this.TypeArgumentList(out types, false);
                        base.Expect(15);
                        base.Expect(1);
                        pexpr = new FieldReferenceExpression(this.GetTypeReferenceExpression(pexpr, types), this.t.val);
                        continue;
                    }
                    if (this.la.kind == 20)
                    {
                        base.lexer.NextToken();
                        List<Expression> arguments = new List<Expression>();
                        if (this.StartOf(0x15))
                        {
                            this.Argument(out expression);
                            if (expression != null)
                            {
                                arguments.Add(expression);
                            }
                            while (this.la.kind == 14)
                            {
                                base.lexer.NextToken();
                                this.Argument(out expression);
                                if (expression != null)
                                {
                                    arguments.Add(expression);
                                }
                            }
                        }
                        base.Expect(0x15);
                        pexpr = new InvocationExpression(pexpr, arguments);
                        continue;
                    }
                    if (this.IsGenericFollowedBy(20))
                    {
                        this.TypeArgumentList(out types, false);
                        base.Expect(20);
                        List<Expression> list6 = new List<Expression>();
                        if (this.StartOf(0x15))
                        {
                            this.Argument(out expression);
                            if (expression != null)
                            {
                                list6.Add(expression);
                            }
                            while (this.la.kind == 14)
                            {
                                base.lexer.NextToken();
                                this.Argument(out expression);
                                if (expression != null)
                                {
                                    list6.Add(expression);
                                }
                            }
                        }
                        base.Expect(0x15);
                        pexpr = new InvocationExpression(pexpr, list6, types);
                        continue;
                    }
                    if (flag)
                    {
                        this.Error("element access not allow on array creation");
                    }
                    List<Expression> list7 = new List<Expression>();
                    base.lexer.NextToken();
                    this.Expr(out expression);
                    if (expression != null)
                    {
                        list7.Add(expression);
                    }
                    while (this.la.kind == 14)
                    {
                        base.lexer.NextToken();
                        this.Expr(out expression);
                        if (expression != null)
                        {
                            list7.Add(expression);
                        }
                    }
                    base.Expect(0x13);
                    pexpr = new IndexerExpression(pexpr, list7);
                }
            }
        }
		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;
		}
 public virtual Node VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     throw new System.NotImplementedException();
 }
Beispiel #15
0
 public override void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     HandleExpressionNode(pointerReferenceExpression);
 }
 private bool IsMatch(PointerReferenceExpression left, PointerReferenceExpression data)
 {
     return(false);
 }
Beispiel #17
0
 public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     pointerReferenceExpression.MemberName = pointerReferenceExpression.MemberName.Replace("32", "64");
     return(base.VisitPointerReferenceExpression(pointerReferenceExpression, data));
 }
Beispiel #18
0
 public void VisitPointerReferenceExpression(PointerReferenceExpression node)
 {
     NotSupported(node);
 }
 public virtual void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     if (this.ThrowException)
     {
         throw (Exception)this.CreateException(pointerReferenceExpression);
     }
 }
 public object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     throw new NotImplementedException();
 }
Beispiel #21
0
			public override object Visit (ComposedCast composedCast)
			{
				var result = new PointerReferenceExpression ();
// TODO:
//				result.Dim = composedCast.Dim;
//				result.AddChild (new CSharpTokenNode (Convert(composedCast.Location), composedCast.Dim.Length), PointerReferenceExpression.Roles.Argument);
				result.AddChild ((INode)composedCast.Left.Accept (this), PointerReferenceExpression.Roles.TargetExpression);
				return result;
			}
 public virtual S VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, T data)
 {
     return(VisitChildren(pointerReferenceExpression, data));
 }
Beispiel #23
0
 public JNode VisitPointerReferenceExpression(PointerReferenceExpression node)
 {
     throw new NotImplementedException();
 }
Beispiel #24
0
        public void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
        {
            JsonObject expression = CreateJsonExpression(pointerReferenceExpression);

            expression.AddJsonValue("target", GenExpression(pointerReferenceExpression.Target));
            expression.AddJsonValue("identifier", GetIdentifier(pointerReferenceExpression.MemberNameToken));
            expression.AddJsonValue("type-arguments", GetTypeArguments(pointerReferenceExpression.TypeArguments));

            Push(expression);
        }
Beispiel #25
0
			public override object Visit (MemberAccess memberAccess)
			{
				Expression result;
				Console.WriteLine (memberAccess.LeftExpression  + "/" + memberAccess.Name);
				if (memberAccess.LeftExpression is Indirection) {
					var ind = memberAccess.LeftExpression as Indirection;
					result = new PointerReferenceExpression ();
					result.AddChild ((Expression)ind.Expr.Accept (this), PointerReferenceExpression.Roles.TargetExpression);
					result.AddChild (new CSharpTokenNode (Convert (ind.Location), "->".Length), PointerReferenceExpression.ArrowRole);
				} else {
					result = new MemberReferenceExpression ();
					if (memberAccess.LeftExpression != null) {
						var leftExpr = memberAccess.LeftExpression.Accept (this);
						result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression);
					}
				}
				
				result.AddChild (new Identifier (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier);
				
				if (memberAccess.TypeArguments != null)  {
					var location = LocationsBag.GetLocations (memberAccess);
					if (location != null)
						result.AddChild (new CSharpTokenNode (Convert (location [0]), 1), MemberReferenceExpression.Roles.LChevron);
					AddTypeArguments (result, location, memberAccess.TypeArguments);
					if (location != null && location.Count > 1)
						result.AddChild (new CSharpTokenNode (Convert (location [1]), 1), MemberReferenceExpression.Roles.RChevron);
				}
				return result;
			}
		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;
		}
Beispiel #27
0
 public override void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     ParenthesizeIfRequired(pointerReferenceExpression.Target, Primary);
     base.VisitPointerReferenceExpression(pointerReferenceExpression);
 }
 public Node VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     return(CreateDummy(pointerReferenceExpression));
 }
 /// <inheritdoc/>
 public virtual void VisitPointerReferenceExpression(PointerReferenceExpression syntax)
 {
     VisitNode(syntax);
 }
		public virtual void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
		{
			DebugExpression(pointerReferenceExpression);
			StartNode(pointerReferenceExpression);
			pointerReferenceExpression.Target.AcceptVisitor(this);
			WriteToken(PointerReferenceExpression.ArrowRole);
			WriteIdentifier(pointerReferenceExpression.MemberNameToken, TextTokenHelper.GetTextTokenType(pointerReferenceExpression.MemberNameToken.Annotation<object>()));
			WriteTypeArguments(pointerReferenceExpression.TypeArguments);
			EndNode(pointerReferenceExpression);
		}
 public override object Visit(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     ReturnType type = pointerReferenceExpression.Expression.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);
 }
Beispiel #32
0
	void PointerMemberAccess(
#line  2002 "cs.ATG" 
out Expression expr, Expression target) {

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

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

#line  2010 "cs.ATG" 
			((MemberReferenceExpression)expr).TypeArguments = typeList; 
		}
	}
Beispiel #33
0
 public StringBuilder VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, int data)
 {
     throw new SLSharpException("SL# does not have pointers.");
 }
Beispiel #34
0
		public virtual void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
		{
			DebugExpression(pointerReferenceExpression);
			StartNode(pointerReferenceExpression);
			pointerReferenceExpression.Target.AcceptVisitor(this);
			WriteToken(PointerReferenceExpression.ArrowRole, BoxedTextColor.Operator);
			WriteIdentifier(pointerReferenceExpression.MemberNameToken, CSharpMetadataTextColorProvider.Instance.GetColor(pointerReferenceExpression.MemberNameToken.Annotation<object>()));
			WriteTypeArguments(pointerReferenceExpression.TypeArguments, CodeBracesRangeFlags.AngleBrackets);
			EndNode(pointerReferenceExpression);
		}
Beispiel #35
0
 public override bool VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     base.VisitPointerReferenceExpression(pointerReferenceExpression, data);
     return(true);
 }
Beispiel #36
0
 public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     return(base.VisitPointerReferenceExpression(pointerReferenceExpression, data));
 }
		public override void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
		{
			ParenthesizeIfRequired(pointerReferenceExpression.Target, Primary);
			base.VisitPointerReferenceExpression(pointerReferenceExpression);
		}
Beispiel #38
0
 public void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     throw new NotImplementedException();
 }
Beispiel #39
0
			public override object Visit (MemberAccess memberAccess)
			{
				Expression result;
				if (memberAccess.LeftExpression is Indirection) {
					var ind = memberAccess.LeftExpression as Indirection;
					result = new PointerReferenceExpression ();
					result.AddChild ((Expression)ind.Expr.Accept (this), PointerReferenceExpression.Roles.TargetExpression);
					result.AddChild (new CSharpTokenNode (Convert (ind.Location), "->".Length), PointerReferenceExpression.ArrowRole);
				} else {
					result = new MemberReferenceExpression ();
					if (memberAccess.LeftExpression != null) {
						var leftExpr = memberAccess.LeftExpression.Accept (this);
						result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression);
					}
					if (!memberAccess.DotLocation.IsNull) {
						result.AddChild (new CSharpTokenNode (Convert (memberAccess.DotLocation), 1), MemberReferenceExpression.Roles.Dot);
					}
				}
						
				result.AddChild (Identifier.Create (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier);
				
				if (memberAccess.TypeArguments != null)  {
					AddTypeArguments (result, memberAccess.TypeArguments);
				}
				return result;
			}
Beispiel #40
0
 public virtual object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data)
 {
     throw new global::System.NotImplementedException("PointerReferenceExpression");
 }
		public virtual void VisitPointerReferenceExpression (PointerReferenceExpression pointerReferenceExpression)
		{
			VisitChildren (pointerReferenceExpression);
		}
Beispiel #42
0
 public StringBuilder VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
 {
     throw new NotImplementedException();
 }
Beispiel #43
0
		public void VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression)
		{
			StartNode(pointerReferenceExpression);
			pointerReferenceExpression.Target.AcceptVisitor(this);
			WriteToken(PointerReferenceExpression.ArrowRole);
			WriteIdentifier(pointerReferenceExpression.MemberName);
			WriteTypeArguments(pointerReferenceExpression.TypeArguments);
			EndNode(pointerReferenceExpression);
		}
		public virtual object TrackedVisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) {
			return base.VisitPointerReferenceExpression(pointerReferenceExpression, data);
		}