コード例 #1
0
		public void VisitPointerType(PointerType pt)
		{
			if(pt.Base is PrimitiveType)
				GenUfcsAndStaticProperties(pt);
			else if (pt.Base != null)
				pt.Base.Accept(this);
		}
コード例 #2
0
 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);
 }
コード例 #3
0
		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);
		}
コード例 #4
0
		public void VisitPointerType(PointerType t)
		{
			AcceptType(t.Base);
			sb.Append('*');
		}
コード例 #5
0
ファイル: ResolutionTests.cs プロジェクト: EnergonV/D_Parser
        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));
        }
コード例 #6
0
 public ITypeDeclaration VisitPointerType(PointerType t)
 {
     return(new PointerDecl(AcceptType(t.Base)));
 }