960{
962 QCString result;
964
966 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
967 {
969 {
971 {
972 case TokenRetval::TK_COMMAND_AT:
973
974 case TokenRetval::TK_COMMAND_BS:
976 {
978 if (isJavaLink)
979 {
982 }
983 goto endlink;
984 default:
987 break;
988 }
989 break;
990 case TokenRetval::TK_SYMBOL:
991 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '%s' found as part of a \\link",
993 break;
994 case TokenRetval::TK_HTMLTAG:
995 if (
parser()->context.token->name!=
"see" || !isXmlLink)
996 {
997 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command %s found as part of a \\link",
999 }
1000 goto endlink;
1001 case TokenRetval::TK_LNKWORD:
1002 case TokenRetval::TK_WORD:
1003 if (isJavaLink)
1004 {
1006 int p = 0;
1007 if (w=="}")
1008 {
1009 goto endlink;
1010 }
1011 else if ((p=w.
find(
'}'))!=-1)
1012 {
1013 int l =
static_cast<int>(w.
length());
1015 if (p<l-1)
1016 {
1017 result=w.
right(l-p-1);
1018 }
1019 goto endlink;
1020 }
1021 }
1023 break;
1024 default:
1026 break;
1027 }
1028 }
1030 }
1031 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1032 {
1034 parser()->tokenizer.getLineNr(),
1035 "Unexpected end of comment while inside link command");
1036 }
1037endlink:
1038
1040 {
1042 }
1043
1045 return result;
1046}
DocNodeVariant * thisVariant()
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children)
int find(char c, int index=0, bool cs=TRUE) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
QCString right(size_t len) const
QCString left(size_t len) const
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
TokenRetval value() const
bool is_any_of(ARGS... args) const
char command_to_char() const
const Mapper< CommandType > * cmdMapper
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.