1012{
1014 QCString result;
1016
1018 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1019 {
1021 {
1022 switch (tok.
value())
1023 {
1024 case TokenRetval::TK_COMMAND_AT:
1025
1026 case TokenRetval::TK_COMMAND_BS:
1028 {
1030 if (isJavaLink)
1031 {
1034 }
1035 goto endlink;
1036 default:
1039 break;
1040 }
1041 break;
1042 case TokenRetval::TK_SYMBOL:
1043 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1044 parser()->context.token->name);
1045 break;
1046 case TokenRetval::TK_HTMLTAG:
1047 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1048 {
1049 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1050 parser()->context.token->name);
1051 }
1052 goto endlink;
1053 case TokenRetval::TK_LNKWORD:
1054 case TokenRetval::TK_WORD:
1055 if (isJavaLink)
1056 {
1058 int p = 0;
1059 if (w=="}")
1060 {
1061 goto endlink;
1062 }
1063 else if ((p=w.
find(
'}'))!=-1)
1064 {
1065 int l =
static_cast<int>(w.
length());
1067 if (p<l-1)
1068 {
1069 result=w.
right(l-p-1);
1070 }
1071 goto endlink;
1072 }
1073 }
1075 break;
1076 default:
1078 break;
1079 }
1080 }
1082 }
1083 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1084 {
1086 parser()->tokenizer.getLineNr(),
1087 "Unexpected end of comment while inside link command");
1088 }
1089endlink:
1090
1092 {
1094 }
1095
1097 return result;
1098}
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.