private static int findAnnotationEnd(String comment, int start) {

		boolean escaped = false;
		boolean inQuote = false;
		for (int i = start; i < comment.length(); i++) {

			boolean wasEscaped = escaped;
			escaped = false;
			char prev = '\0';
			if (i != 0 && !wasEscaped) {
				prev = comment.charAt(i - 1);
			}

			char c = comment.charAt(i);
			if (prev == '\\') {
				if (Annotation.ESCAPABLE_CHARS.indexOf(c) != -1) {
					escaped = true;
					continue;
				}
			}

			if (c == '"') {
				inQuote = !inQuote;
			}
			else if (c == '}') {
				if (!inQuote) {
					return i + 1;
				}
			}
		}

		return -1;
	}
Split the given text into parts where the returned list contains either a String or 
an Annotation

@param text the text to parse
@param fixerUpper a function that is given a chance to convert an Annotation into a new one
@param program the program
@return a list that contains a mixture String or an Annotation entries
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/CommentUtils.java