1019{
1021 QCString result;
1023
1025 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1026 {
1028 {
1029 switch (tok.
value())
1030 {
1031 case TokenRetval::TK_COMMAND_AT:
1032
1033 case TokenRetval::TK_COMMAND_BS:
1035 {
1037 if (isJavaLink)
1038 {
1041 }
1042 goto endlink;
1043 default:
1046 break;
1047 }
1048 break;
1049 case TokenRetval::TK_SYMBOL:
1050 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1051 parser()->context.token->name);
1052 break;
1053 case TokenRetval::TK_HTMLTAG:
1054 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1055 {
1056 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1057 parser()->context.token->name);
1058 }
1059 goto endlink;
1060 case TokenRetval::TK_LNKWORD:
1061 case TokenRetval::TK_WORD:
1062 if (isJavaLink)
1063 {
1065 int p = 0;
1066 if (w=="}")
1067 {
1068 goto endlink;
1069 }
1070 else if ((p=w.
find(
'}'))!=-1)
1071 {
1072 int l =
static_cast<int>(w.
length());
1074 if (p<l-1)
1075 {
1076 result=w.
right(l-p-1);
1077 }
1078 goto endlink;
1079 }
1080 }
1082 break;
1083 default:
1085 break;
1086 }
1087 }
1089 }
1090 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1091 {
1093 parser()->tokenizer.getLineNr(),
1094 "Unexpected end of comment while inside link command");
1095 }
1096endlink:
1097
1099 {
1101 }
1102
1104 return result;
1105}
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.