public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) {
			Debug.Assert((caseLabel != null));
			Debug.Assert((caseLabel.Label != null));
			Debug.Assert((caseLabel.ToExpression != null));
			caseLabel.Label.AcceptVisitor(this, data);
			return caseLabel.ToExpression.AcceptVisitor(this, data);
		}
		public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) {
			throw new global::System.NotImplementedException("CaseLabel");
		}
		public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) {
			Debug.Assert((caseLabel != null));
			Debug.Assert((caseLabel.Label != null));
			Debug.Assert((caseLabel.ToExpression != null));
			nodeStack.Push(caseLabel.Label);
			caseLabel.Label.AcceptVisitor(this, data);
			caseLabel.Label = ((Expression)(nodeStack.Pop()));
			nodeStack.Push(caseLabel.ToExpression);
			caseLabel.ToExpression.AcceptVisitor(this, data);
			caseLabel.ToExpression = ((Expression)(nodeStack.Pop()));
			return null;
		}
Exemple #4
0
	void CaseClause(out CaseLabel caseClause) {
		Expression expr = null;
		Expression sexpr = null;
		BinaryOperatorType op = BinaryOperatorType.None;
		caseClause = null;

		if (la.kind == 111) {
			Get();
			caseClause = new CaseLabel();
		} else if (StartOf(47)) {
			if (la.kind == 144) {
				Get();
			}
			switch (la.kind) {
			case 40: {
				Get();
				op = BinaryOperatorType.LessThan;
				break;
			}
			case 39: {
				Get();
				op = BinaryOperatorType.GreaterThan;
				break;
			}
			case 43: {
				Get();
				op = BinaryOperatorType.LessThanOrEqual;
				break;
			}
			case 42: {
				Get();
				op = BinaryOperatorType.GreaterThanOrEqual;
				break;
			}
			case 20: {
				Get();
				op = BinaryOperatorType.Equality;
				break;
			}
			case 41: {
				Get();
				op = BinaryOperatorType.InEquality;
				break;
			}
			default: SynErr(317); break;
			}
			Expr(out expr);
			caseClause = new CaseLabel(op, expr);

		} else if (StartOf(24)) {
			Expr(out expr);
			if (la.kind == 216) {
				Get();
				Expr(out sexpr);
			}
			caseClause = new CaseLabel(expr, sexpr);

		} else SynErr(318);
	}
		public sealed override object VisitCaseLabel(CaseLabel caseLabel, object data) {
			this.BeginVisit(caseLabel);
			object result = this.TrackedVisitCaseLabel(caseLabel, data);
			this.EndVisit(caseLabel);
			return result;
		}
		public virtual object TrackedVisitCaseLabel(CaseLabel caseLabel, object data) {
			return base.VisitCaseLabel(caseLabel, data);
		}