public void VisitPointerType(PointerType pt)
		{
			if(pt.Base is PrimitiveType)
				GenUfcsAndStaticProperties(pt);
			else if (pt.Base != null)
				pt.Base.Accept(this);
		}
 public void VisitPointerType(PointerType pt)
 {
     if (pt.Base != null &&
         !(pt.Base is PrimitiveType && pt.Base.DeclarationOrExpressionBase is PointerDecl))
     {
         isVariableInstance = true;
         pt.Base.Accept(this);
     }
     else
         GenUfcsAndStaticProperties(pt);
 }
		ObjectValue EvaluatePointer(string exp, PointerType t, ObjectValueFlags flags, ObjectPath path)
		{
			var ptBase = t.Base;
			MemoryExamination.enforceRawExpr (ref exp);
			return EvaluateVariable("*(int**)"+exp, ref ptBase, flags, path);
		}
		public void VisitPointerType(PointerType t)
		{
			AcceptType(t.Base);
			sb.Append('*');
		}
Example #5
0
        public void StringSliceConvertability()
        {
            var ctxt = CreateCtxt ("A", @"module A;");

            var constChar = new PointerType (new PrimitiveType(DTokens.Char, DTokens.Const), null);

            IExpression x;
            AbstractType t;

            x = DParser.ParseExpression ("\"abc\"");
            t = Evaluation.EvaluateType (x, ctxt);

            Assert.That (ResultComparer.IsImplicitlyConvertible (t, constChar, ctxt));

            x = DParser.ParseExpression ("\"abc\"[0..2]");
            t = Evaluation.EvaluateType (x, ctxt);

            Assert.That (ResultComparer.IsImplicitlyConvertible (t, constChar, ctxt));
        }
Example #6
0
 public ITypeDeclaration VisitPointerType(PointerType t)
 {
     return(new PointerDecl(AcceptType(t.Base)));
 }