969{
971 QCString result;
973
975 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
976 {
978 {
980 {
981 case TokenRetval::TK_COMMAND_AT:
982
983 case TokenRetval::TK_COMMAND_BS:
985 {
987 if (isJavaLink)
988 {
991 }
992 goto endlink;
993 default:
996 break;
997 }
998 break;
999 case TokenRetval::TK_SYMBOL:
1000 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1001 parser()->context.token->name);
1002 break;
1003 case TokenRetval::TK_HTMLTAG:
1004 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1005 {
1006 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1007 parser()->context.token->name);
1008 }
1009 goto endlink;
1010 case TokenRetval::TK_LNKWORD:
1011 case TokenRetval::TK_WORD:
1012 if (isJavaLink)
1013 {
1015 int p = 0;
1016 if (w=="}")
1017 {
1018 goto endlink;
1019 }
1020 else if ((p=w.
find(
'}'))!=-1)
1021 {
1022 int l =
static_cast<int>(w.
length());
1024 if (p<l-1)
1025 {
1026 result=w.
right(l-p-1);
1027 }
1028 goto endlink;
1029 }
1030 }
1032 break;
1033 default:
1035 break;
1036 }
1037 }
1039 }
1040 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1041 {
1043 parser()->tokenizer.getLineNr(),
1044 "Unexpected end of comment while inside link command");
1045 }
1046endlink:
1047
1049 {
1051 }
1052
1054 return result;
1055}
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.