public TreeCursor getLastChild(TreeType type) {
        List<TokenTree> children = tree.getChildren();
        ListIterator<TokenTree> iterator = children.listIterator(children.size());
        while (iterator.hasPrevious()) {
            TokenTree child = iterator.previous();
            if (child.getType() == type) {
                return new TreeCursor(child, this);
            }
        }
        return null;
    }
Get the last child of the wrapped tree with the given type.

@param type Child type to get.
@return Return the last child, or null if a matching child is not found.
smithy-syntax/src/main/java/software/amazon/smithy/syntax/TreeCursor.java