public virtual ICodeNode VisitCatchClause(CatchClause node) { node.Body = (BlockStatement)Visit(node.Body); node.Variable = (VariableDeclarationExpression)Visit(node.Variable); return(node); }
public override void VisitCatchClause (CatchClause node) { WriteKeyword ("catch"); if (node.Type.FullName != "System.Object") { WriteSpace (); WriteToken ("("); if (node.Variable != null) Visit (node.Variable); else WriteReference (node.Type); WriteToken (")"); } WriteLine (); Visit (node.Body); }
public virtual void VisitCatchClause (CatchClause node) { Visit (node.Body); Visit (node.Variable); }
CatchClause CreateCatchHandler (CatchHandlerData catch_data) { var range = catch_data.Range; var variable = GetCatchVariable (range.Start.First); RemoveVariable (variable); var clause = new CatchClause ( new BlockStatement (), catch_data.Type, new VariableDeclarationExpression (variable)); MoveStatementsToBlock (range.Start, range.End, clause.Body); return clause; }
public virtual void VisitCatchClause(CatchClause node) { Visit(node.Body); Visit(node.Variable); }