public SwitchStatement(HappySourceLocation startsAt, HappySourceLocation endsAt, ExpressionNodeBase switchExpression, SwitchCase[] cases, StatementBlock defaultCase) : base(startsAt, endsAt) { this.SwitchExpression = switchExpression; this.Cases = cases; this.DefaultStatementBlock = defaultCase; }
public virtual void BeforeVisit(SwitchCase node) { this.BeforeVisitCatchAll(node); }
public virtual void AfterVisit(SwitchCase node) { this.AfterVisitCatchAll(node); }
public override void AfterVisit(SwitchCase node) { var caseBlock = EnsureVoidResult(_expressionStack.Pop()); //Should be a block expression var caseValues = _expressionStack.Pop(node.CaseValues.Length); _expressionStack.Push(node, new ContainerPseudoExpression<System.Linq.Expressions.SwitchCase>(Expression.SwitchCase(caseBlock, caseValues))); base.AfterVisit(node); }