private CheckedStatement ParseChecked() { CheckedStatement node = new CheckedStatement(curtok); AssertAndAdvance(TokenID.Checked); // advance over Checked if (curtok.ID == TokenID.LParen) { Advance(); node.CheckedExpression = ParseExpression(); AssertAndAdvance(TokenID.RParen); } else { node.CheckedBlock = new BlockStatement(curtok); ParseBlock(node.CheckedBlock); } if (curtok.ID == TokenID.Semi) Advance(); return node; }
public virtual object VisitCheckedStatement(CheckedStatement checkedStatement, object data) { stackMap.Push(checkedStatement); if (checkedStatement.CheckedExpression != null) { checkedStatement.CheckedExpression.AcceptVisitor(this, data); } if (checkedStatement.CheckedBlock != null) { checkedStatement.CheckedBlock.AcceptVisitor(this, data); } stackMap.Pop(); return null; }