diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-04-11 16:51:38 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:24:14 +0200 |
commit | d369ff33faa4bf5654db3f1eb105141fccf2270d (patch) | |
tree | dd09b8f9a628d055b36b96b3fca9b4b407c1413d /src/core/parser/stack/DocumentHandler.hpp | |
parent | 994615f76b86a65f11829863be96c63135eef977 (diff) |
Reimplement closeToken handling
Idea: Only start unrolling anything on the parser stack
if an element that matches the given close token is found.
This requires the endToken method in DocumentChildHandler
to search for the given descriptor that might be ended.
While performing this search, only a specified number of
"explicit" structures/fields opened by the Stack class may
be skipped (those with implicit default fields).
Added an integration test ("python_code") which requires
this new (hopefully sane) behaviour.
Diffstat (limited to 'src/core/parser/stack/DocumentHandler.hpp')
-rw-r--r-- | src/core/parser/stack/DocumentHandler.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/parser/stack/DocumentHandler.hpp b/src/core/parser/stack/DocumentHandler.hpp index 75e32fd..3ef5f08 100644 --- a/src/core/parser/stack/DocumentHandler.hpp +++ b/src/core/parser/stack/DocumentHandler.hpp @@ -222,7 +222,7 @@ public: bool startCommand(Variant::mapType &args) override; bool startAnnotation(Variant::mapType &args) override; bool startToken(Handle<Node> node) override; - EndTokenResult endToken(const Token &token, Handle<Node> node) override; + EndTokenResult endToken(Handle<Node> node, size_t maxStackDepth) override; void end() override; bool data() override; bool fieldStart(bool &isDefault, size_t fieldIdx) override; |