1034{
1036 QCString result;
1038
1040 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1041 {
1043 {
1044 switch (tok.
value())
1045 {
1046 case TokenRetval::TK_COMMAND_AT:
1047
1048 case TokenRetval::TK_COMMAND_BS:
1050 {
1052 if (isJavaLink)
1053 {
1056 }
1057 goto endlink;
1058 default:
1061 break;
1062 }
1063 break;
1064 case TokenRetval::TK_SYMBOL:
1065 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1066 parser()->context.token->name);
1067 break;
1068 case TokenRetval::TK_HTMLTAG:
1069 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1070 {
1071 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1072 parser()->context.token->name);
1073 }
1074 goto endlink;
1075 case TokenRetval::TK_LNKWORD:
1076 case TokenRetval::TK_WORD:
1077 if (isJavaLink)
1078 {
1080 int p = 0;
1081 if (w=="}")
1082 {
1083 goto endlink;
1084 }
1085 else if ((p=w.
find(
'}'))!=-1)
1086 {
1087 int l =
static_cast<int>(w.
length());
1089 if (p<l-1)
1090 {
1091 result=w.
right(l-p-1);
1092 }
1093 goto endlink;
1094 }
1095 }
1097 break;
1098 default:
1100 break;
1101 }
1102 }
1104 }
1105 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1106 {
1108 parser()->tokenizer.getLineNr(),
1109 "Unexpected end of comment while inside link command");
1110 }
1111endlink:
1112
1114 {
1116 }
1117
1119 return result;
1120}
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.