code: @SuppressWarnings("fallthrough")
      protected void reference(boolean allowMember) throws ParseException {
          int pos = bp;
          int depth = 0;
  
          // scan to find the end of the signature, by looking for the first
          // whitespace not enclosed in () or <>, or the end of the tag
          loop:
          while (bp < buflen) {
              switch (ch) {
                  case '\n': case '\r': case '\f':
                      newline = true;
                      // fallthrough
  
                  case ' ': case '\t':
                      if (depth == 0)
                          break loop;
                      break;
  
                  case '(':
                  case '<':
                      newline = false;
                      depth++;
                      break;
  
                  case ')':
                  case '>':
                      newline = false;
                      --depth;
                      break;
  
                  case '}':
                      if (bp == pos)
                          return;
                      newline = false;
                      break loop;
  
                  case '@':
                      if (newline)
                          break loop;
                      // fallthrough
  
                  default:
                      newline = false;
  
              }
              nextChar();
          }
  
          if (depth != 0)
              throw new ParseException("dc.unterminated.signature");
      }
docs: TODO: update to use ReferenceParser