1011{
1013 QCString result;
1015
1017 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1018 {
1020 {
1021 switch (tok.
value())
1022 {
1023 case TokenRetval::TK_COMMAND_AT:
1024
1025 case TokenRetval::TK_COMMAND_BS:
1027 {
1029 if (isJavaLink)
1030 {
1033 }
1034 goto endlink;
1035 default:
1038 break;
1039 }
1040 break;
1041 case TokenRetval::TK_SYMBOL:
1042 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1043 parser()->context.token->name);
1044 break;
1045 case TokenRetval::TK_HTMLTAG:
1046 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1047 {
1048 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1049 parser()->context.token->name);
1050 }
1051 goto endlink;
1052 case TokenRetval::TK_LNKWORD:
1053 case TokenRetval::TK_WORD:
1054 if (isJavaLink)
1055 {
1057 int p = 0;
1058 if (w=="}")
1059 {
1060 goto endlink;
1061 }
1062 else if ((p=w.
find(
'}'))!=-1)
1063 {
1064 int l =
static_cast<int>(w.
length());
1066 if (p<l-1)
1067 {
1068 result=w.
right(l-p-1);
1069 }
1070 goto endlink;
1071 }
1072 }
1074 break;
1075 default:
1077 break;
1078 }
1079 }
1081 }
1082 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1083 {
1085 parser()->tokenizer.getLineNr(),
1086 "Unexpected end of comment while inside link command");
1087 }
1088endlink:
1089
1091 {
1093 }
1094
1096 return result;
1097}
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.