public virtual void Visit(VectorDeclaration td)
        {
            VisitInner(td);

            if (td.Id != null)
            {
                td.Id.Accept(this);
            }
        }
        bool HandleDecl(VectorDeclaration v, AbstractType r)
        {
            if (r.DeclarationOrExpressionBase is VectorDeclaration)
            {
                var v_res = ExpressionTypeEvaluation.EvaluateType(v.Id, ctxt);
                var r_res = ExpressionTypeEvaluation.EvaluateType(((VectorDeclaration)r.DeclarationOrExpressionBase).Id, ctxt);

                if (v_res == null || r_res == null)
                    return false;
                else
                    return ResultComparer.IsImplicitlyConvertible(r_res, v_res);
            }
            return false;
        }
示例#3
0
        VectorDeclaration Vector()
        {
            var startLoc = t == null ? new CodeLocation() : t.Location;
            Expect(__vector);
            var md = new VectorDeclaration { Location = startLoc };

            if (Expect(OpenParenthesis))
            {
                if (IsAssignExpression())
                    md.Id = Expression();
                else
                    md.IdDeclaration = Type();
                Expect(CloseParenthesis);
            }

            md.EndLocation = t.EndLocation;
            return md;
        }
        public virtual void Visit(VectorDeclaration td)
        {
            VisitInner(td);

            if (td.IdDeclaration != null)
                td.IdDeclaration.Accept(this);
            if (td.Id != null)
                td.Id.Accept(this);
        }
示例#5
0
        VectorDeclaration Vector()
        {
            var startLoc = t == null ? new CodeLocation() : t.Location;
            Expect(__vector);
            var md = new VectorDeclaration { Location = startLoc };

            if (Expect(OpenParenthesis))
            {
                LastParsedObject = md;

                if (!IsEOF)
                    md.Id = Expression();

                if (Expect(CloseParenthesis))
                    TrackerVariables.ExpectingIdentifier = false;
            }

            md.EndLocation = t.EndLocation;
            return md;
        }
		bool HandleDecl(VectorDeclaration v, AbstractType r)
		{
			throw new System.NotImplementedException (); //TODO: Reimplement typedeclarationresolver as proper Visitor.
			/*if (r.DeclarationOrExpressionBase is VectorDeclaration)
			{
				var v_res = ExpressionTypeEvaluation.EvaluateType(v.Id, ctxt);
				var r_res = ExpressionTypeEvaluation.EvaluateType(((VectorDeclaration)r.DeclarationOrExpressionBase).Id, ctxt);

				if (v_res == null || r_res == null)
					return false;
				else
					return ResultComparer.IsImplicitlyConvertible(r_res, v_res);
			}*/
			return false;
		}