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