private static int PreviousStatementIndex(Block node, AstNode child)
        {
            // get the index of the statement before the last return
            // (skip over function decls and importand comments)
            var indexPrevious = node.IndexOf(child) - 1;
            while (indexPrevious >= 0 && (node[indexPrevious] is FunctionObject || node[indexPrevious] is ImportantComment))
            {
                --indexPrevious;
            }

            return indexPrevious;
        }