2017{
2019 Token retval = Token::make_RetVal_OK();
2021
2024 DocHtmlCell *cell=nullptr;
2025
2027
2028 if (tok.
is(TokenRetval::TK_HTMLTAG))
2029 {
2032 {
2033 }
2035 {
2037 }
2038 else
2039 {
2041 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2043 goto endrow;
2044 }
2045 }
2046 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2047 {
2049 " for a html description title");
2050 goto endrow;
2051 }
2052 else
2053 {
2054 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2056 goto endrow;
2057 }
2058
2059
2060 do
2061 {
2068 retval=cell->
parse();
2069 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2070
2071 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2072 {
2073
2075
2077 if (tok.
is(TokenRetval::TK_HTMLTAG))
2078 {
2080 !
parser()->context.token->endTag)
2081 {
2082 retval = Token::make_RetVal_TableCell();
2084 }
2086 {
2087 if (
parser()->context.token->endTag)
2088 {
2089 retval = Token::make_RetVal_EndTableRow();
2090 }
2091 else
2092 {
2093 retval = Token::make_RetVal_TableRow();
2094 }
2095 }
2097 {
2098 retval = Token::make_RetVal_EndTable();
2099 }
2100 else
2101 {
2103 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2105 goto endrow;
2106 }
2107 }
2108 else
2109 {
2110 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2112 goto endrow;
2113 }
2114 }
2115 }
2116 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2118
2119endrow:
2120 return retval;
2121}
void markLast(bool v=TRUE)
void markFirst(bool v=TRUE)
DocNodeVariant * thisVariant()
void pushBackHtmlTag(const QCString &tag)
bool is(TokenRetval rv) const
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
bool is_any_of(ARGS... args) const
static Token skipSpacesForTable(DocParser *parser)
#define warn_doc_error(file, line, fmt,...)
const Mapper< HtmlTagType > * htmlTagMapper
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...