void BranchError(GotoStatement node, LabelStatement target) { Node parent = AstUtil.GetParentTryExceptEnsure(target); switch (parent.NodeType) { case NodeType.TryStatement: { Error(CompilerErrorFactory.CannotBranchIntoTry(node.Label)); break; } case NodeType.ExceptionHandler: { Error(CompilerErrorFactory.CannotBranchIntoExcept(node.Label)); break; } case NodeType.Block: { Error(CompilerErrorFactory.CannotBranchIntoEnsure(node.Label)); break; } } }