Skip to main content

The DocSecRefList Class Reference

Node representing a list of section references. More...

Declaration

class DocSecRefList { ... }

Included Headers

#include <src/docnode.h>

Base class

classDocCompoundNode

Base class for nodes with children. More...

Public Constructors Index

DocSecRefList (DocParser *parser, DocNodeVariant *parent)

Public Member Functions Index

voidparse ()

Description

Node representing a list of section references.

Definition at line 958 of file docnode.h.

Public Constructors

DocSecRefList()

DocSecRefList::DocSecRefList (DocParser * parser, DocNodeVariant * parent)
inline

Public Member Functions

parse()

void DocSecRefList::parse ()

Declaration at line 962 of file docnode.h, definition at line 610 of file docnode.cpp.

611{
612 AUTO_TRACE();
613 auto ns = AutoNodeStack(parser(),thisVariant());
614
615 Token tok=parser()->tokenizer.lex();
616 // skip white space
617 while (tok.is_any_of(TokenRetval::TK_WHITESPACE, TokenRetval::TK_NEWPARA)) tok=parser()->tokenizer.lex();
618 // handle items
619 while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
620 {
621 if (tok.is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
622 {
623 switch (Mappers::cmdMapper->map(parser()->context.token->name))
624 {
626 {
627 tok=parser()->tokenizer.lex();
628 if (!tok.is(TokenRetval::TK_WHITESPACE))
629 {
630 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\refitem command");
631 break;
632 }
633 tok=parser()->tokenizer.lex();
634 if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
635 {
636 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token {} as the argument of \\refitem",
637 tok.to_string());
638 break;
639 }
640
643 }
644 break;
646 return;
647 default:
648 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Illegal command '{:c}{}' as part of a \\secreflist",
649 tok.command_to_char(),qPrint(parser()->context.token->name));
650 return;
651 }
652 }
653 else if (tok.is(TokenRetval::TK_WHITESPACE))
654 {
655 // ignore whitespace
656 }
657 else
658 {
659 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected token {} inside section reference list",
660 tok.to_string());
661 return;
662 }
663 tok=parser()->tokenizer.lex();
664 }
665
666}

References DocNodeList::append, AUTO_TRACE, DocCompoundNode::children, CMD_ENDSECREFLIST, CMD_SECREFITEM, Mappers::cmdMapper, Token::command_to_char, DocParser::context, DocNodeList::get_last, Token::is, Token::is_any_of, DocTokenizer::lex, TokenInfo::name, parse, DocNode::parser, qPrint, DocNode::thisVariant, Token::to_string, DocParserContext::token, DocParser::tokenizer and warn_doc_error.

Referenced by parse.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus by Doxygen 1.14.0.