1033{
1035 QCString result;
1037
1039 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1040 {
1042 {
1043 switch (tok.
value())
1044 {
1045 case TokenRetval::TK_COMMAND_AT:
1046
1047 case TokenRetval::TK_COMMAND_BS:
1049 {
1051 if (isJavaLink)
1052 {
1055 }
1056 goto endlink;
1057 default:
1060 break;
1061 }
1062 break;
1063 case TokenRetval::TK_SYMBOL:
1064 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1065 parser()->context.token->name);
1066 break;
1067 case TokenRetval::TK_HTMLTAG:
1068 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1069 {
1070 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1071 parser()->context.token->name);
1072 }
1073 goto endlink;
1074 case TokenRetval::TK_LNKWORD:
1075 case TokenRetval::TK_WORD:
1076 if (isJavaLink)
1077 {
1079 int p = 0;
1080 if (w=="}")
1081 {
1082 goto endlink;
1083 }
1084 else if ((p=w.
find(
'}'))!=-1)
1085 {
1086 int l =
static_cast<int>(w.
length());
1088 if (p<l-1)
1089 {
1090 result=w.
right(l-p-1);
1091 }
1092 goto endlink;
1093 }
1094 }
1096 break;
1097 default:
1099 break;
1100 }
1101 }
1103 }
1104 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1105 {
1107 parser()->tokenizer.getLineNr(),
1108 "Unexpected end of comment while inside link command");
1109 }
1110endlink:
1111
1113 {
1115 }
1116
1118 return result;
1119}
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.