private Types.Type VisitUnaryExpectedType(IUnary node, Types.Type expectedType) { Types.Type childType = node.GetChildExpression().Accept(this); if (childType.IsEqual(expectedType)) { collectedNotifications.Add(new IncompatibleUnaryOperator(node.GetPosition(), node.MakeString(), childType.GetString())); } return(expectedType); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.Inner == null)) { IUnary innerCasted = item.As <IUnary>(); if ((innerCasted != null)) { this._parent.Inner = innerCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.Base == null)) { IPower baseCasted = item.As <IPower>(); if ((baseCasted != null)) { this._parent.Base = baseCasted; return; } } if ((this._parent.Exponent == null)) { IUnary exponentCasted = item.As <IUnary>(); if ((exponentCasted != null)) { this._parent.Exponent = exponentCasted; return; } } }
private Types.Type VisitUnary(IUnary node) { return(node.GetChildExpression().Accept(this)); }
/// <summary> /// Constructor /// </summary> /// <param name="unary">Unary</param> /// <param name="index">Index of unary</param> public ElementaryUnaryOperation(IUnary unary, int index) { this.unary = unary; this.index = index; }
private IList <Id> VisitUnary(IUnary node) { return(node.GetChildExpression().Accept(this)); }