999{
1001 QCString result;
1003
1005 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1006 {
1008 {
1009 switch (tok.
value())
1010 {
1011 case TokenRetval::TK_COMMAND_AT:
1012
1013 case TokenRetval::TK_COMMAND_BS:
1015 {
1017 if (isJavaLink)
1018 {
1021 }
1022 goto endlink;
1023 default:
1026 break;
1027 }
1028 break;
1029 case TokenRetval::TK_SYMBOL:
1030 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1031 parser()->context.token->name);
1032 break;
1033 case TokenRetval::TK_HTMLTAG:
1034 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1035 {
1036 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1037 parser()->context.token->name);
1038 }
1039 goto endlink;
1040 case TokenRetval::TK_LNKWORD:
1041 case TokenRetval::TK_WORD:
1042 if (isJavaLink)
1043 {
1045 int p = 0;
1046 if (w=="}")
1047 {
1048 goto endlink;
1049 }
1050 else if ((p=w.
find(
'}'))!=-1)
1051 {
1052 int l =
static_cast<int>(w.
length());
1054 if (p<l-1)
1055 {
1056 result=w.
right(l-p-1);
1057 }
1058 goto endlink;
1059 }
1060 }
1062 break;
1063 default:
1065 break;
1066 }
1067 }
1069 }
1070 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1071 {
1073 parser()->tokenizer.getLineNr(),
1074 "Unexpected end of comment while inside link command");
1075 }
1076endlink:
1077
1079 {
1081 }
1082
1084 return result;
1085}
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.