fix: make headers parseable by CppParser/PocoDoc

This commit is contained in:
Günter Obiltschnig
2024-02-06 09:59:38 +01:00
parent 3bb76f51ad
commit 7ffdcf97d4
6 changed files with 47 additions and 17 deletions

View File

@@ -280,6 +280,7 @@ private:
EventType nextBody();
void handleError();
#ifndef POCO_DOC
// If _size is 0, then data is std::istream. Otherwise, it is a buffer.
union
{
@@ -287,6 +288,13 @@ private:
const void* buf;
}
_data;
#endif
enum ParserState
{
state_next,
state_peek
};
std::size_t _size;
const std::string _inputName;
@@ -294,7 +302,7 @@ private:
XML_Parser _parser;
std::size_t _depth;
bool _accumulateContent; // Whether we are accumulating character content.
enum { state_next, state_peek } _parserState;
ParserState _parserState;
EventType _currentEvent;
EventType _queue;
QName _qname;