public virtual object VisitFinallyStatement(FinallyNode finallyStatement, object data) { stackMap.Push(finallyStatement); finallyStatement.FinallyBlock.AcceptVisitor(this, data); stackMap.Pop(); return(null); }
private TryStatement ParseTry() { TryStatement node = new TryStatement(curtok); Advance(); // advance over Try isTry++; ParseBlock(node.TryBlock); isTry--; while (curtok.ID == TokenID.Catch) { isCatch++; CatchNode cn = new CatchNode(curtok); node.CatchBlocks.Add(cn); Advance(); // over catch if (curtok.ID == TokenID.LParen) { Advance(); // over lparen cn.ClassType = ParseType(); if (curtok.ID == TokenID.Ident) { cn.Identifier = new IdentifierExpression(strings[curtok.Data], curtok); Advance(); } AssertAndAdvance(TokenID.RParen); ParseBlock(cn.CatchBlock); } else { ParseBlock(cn.CatchBlock); isCatch--; break; // must be last catch block if not a specific catch clause } isCatch--; } if (curtok.ID == TokenID.Finally) { Advance(); // over finally FinallyNode fn = new FinallyNode(curtok); node.FinallyBlock = fn; isFinally++; ParseBlock(fn.FinallyBlock); isFinally--; } if (curtok.ID == TokenID.Semi) { Advance(); } hasYieldReturnInTry = false; return node; }
public virtual object VisitFinallyStatement(FinallyNode finallyStatement, object data) { stackMap.Push(finallyStatement); finallyStatement.FinallyBlock.AcceptVisitor(this, data); stackMap.Pop(); return null; }