Esempio n. 1
0
 public SwitchStatement(HappySourceLocation startsAt, HappySourceLocation endsAt, ExpressionNodeBase switchExpression, SwitchCase[] cases, StatementBlock defaultCase)
     : base(startsAt, endsAt)
 {
     this.SwitchExpression = switchExpression;
     this.Cases = cases;
     this.DefaultStatementBlock = defaultCase;
 }
Esempio n. 2
0
 public virtual void BeforeVisit(SwitchCase node)
 {
     this.BeforeVisitCatchAll(node);
 }
Esempio n. 3
0
 public virtual void AfterVisit(SwitchCase node)
 {
     this.AfterVisitCatchAll(node);
 }
Esempio n. 4
0
        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);
        }