summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/parser/ParserStack.cpp3
-rw-r--r--src/core/parser/ParserStack.hpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/parser/ParserStack.cpp b/src/core/parser/ParserStack.cpp
index 01fce3f..7bc7af3 100644
--- a/src/core/parser/ParserStack.cpp
+++ b/src/core/parser/ParserStack.cpp
@@ -100,7 +100,8 @@ void ParserStack::start(std::string name, char **attrs)
const HandlerDescriptor *descr = nullptr;
auto range = handlers.equal_range(name);
for (auto it = range.first; it != range.second; it++) {
- if (it->second.parentStates.count(curState)) {
+ const std::set<State> &parentStates = it->second.parentStates;
+ if (parentStates.count(curState) || parentStates.count(STATE_ALL)) {
descr = &(it->second);
break;
}
diff --git a/src/core/parser/ParserStack.hpp b/src/core/parser/ParserStack.hpp
index a777b1e..18fc8d9 100644
--- a/src/core/parser/ParserStack.hpp
+++ b/src/core/parser/ParserStack.hpp
@@ -45,7 +45,7 @@ namespace parser {
/**
* The State type alias is used to
*/
-using State = int8_t;
+using State = int16_t;
static const State STATE_ALL = -2;
static const State STATE_NONE = -1;
@@ -140,6 +140,7 @@ public:
* Handler instance.
*
* TODO: Replace with std::string?
+ * TODO: Per default: Allow no data except for whitespace characters!
*
* @param data is a pointer at the character data that is available for the
* Handler instance.