975{
977 QCString result;
979
981 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
982 {
984 {
986 {
987 case TokenRetval::TK_COMMAND_AT:
988
989 case TokenRetval::TK_COMMAND_BS:
991 {
993 if (isJavaLink)
994 {
997 }
998 goto endlink;
999 default:
1002 break;
1003 }
1004 break;
1005 case TokenRetval::TK_SYMBOL:
1006 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1007 parser()->context.token->name);
1008 break;
1009 case TokenRetval::TK_HTMLTAG:
1010 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1011 {
1012 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1013 parser()->context.token->name);
1014 }
1015 goto endlink;
1016 case TokenRetval::TK_LNKWORD:
1017 case TokenRetval::TK_WORD:
1018 if (isJavaLink)
1019 {
1021 int p = 0;
1022 if (w=="}")
1023 {
1024 goto endlink;
1025 }
1026 else if ((p=w.
find(
'}'))!=-1)
1027 {
1028 int l =
static_cast<int>(w.
length());
1030 if (p<l-1)
1031 {
1032 result=w.
right(l-p-1);
1033 }
1034 goto endlink;
1035 }
1036 }
1038 break;
1039 default:
1041 break;
1042 }
1043 }
1045 }
1046 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1047 {
1049 parser()->tokenizer.getLineNr(),
1050 "Unexpected end of comment while inside link command");
1051 }
1052endlink:
1053
1055 {
1057 }
1058
1060 return result;
1061}
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.