code: protected List<JCAnnotation> annotationsOpt(Tag kind) {
          if (token.kind != MONKEYS_AT) return List.nil(); // optimization
          ListBuffer<JCAnnotation> buf = new ListBuffer<>();
          int prevmode = mode;
          while (token.kind == MONKEYS_AT) {
              int pos = token.pos;
              nextToken();
              buf.append(annotation(pos, kind));
          }
          lastmode = mode;
          mode = prevmode;
          List<JCAnnotation> annotations = buf.toList();
  
          return annotations;
      }
docs: AnnotationsOpt = { '@' Annotation }
  
  @param kind Whether to parse an ANNOTATION or TYPE_ANNOTATION