List<JCTree> resources() {
        ListBuffer<JCTree> defs = new ListBuffer<JCTree>();
        defs.append(resource());
        while (S.token() == SEMI) {
            // All but last of multiple declarators must subsume a semicolon
            storeEnd(defs.elems.last(), S.endPos());
            int semiColonPos = S.pos();
            S.nextToken();
            if (S.token() == RPAREN) { // Optional trailing semicolon
                                       // after last resource
                break;
            }
            defs.append(resource());
        }
        return defs.toList();
    }