summaryrefslogtreecommitdiff
path: root/src/core/parser/stack/DocumentHandler.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-12 17:38:36 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:24:15 +0200
commit2416462060ef54cb737688f648d150313b82e5f4 (patch)
tree3de90284b12531c98ac1b5058d8d788348a3b9f3 /src/core/parser/stack/DocumentHandler.cpp
parent8bfc7878a725d8f1c2754893bc8b660ff78f89bf (diff)
Pass "greedy" flag to Handler::startToken
Diffstat (limited to 'src/core/parser/stack/DocumentHandler.cpp')
-rw-r--r--src/core/parser/stack/DocumentHandler.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp
index 0912eb6..aa9a28f 100644
--- a/src/core/parser/stack/DocumentHandler.cpp
+++ b/src/core/parser/stack/DocumentHandler.cpp
@@ -89,6 +89,7 @@ Rooted<FieldDescriptor> DocumentField::getDescriptor()
DocumentChildHandler::DocumentChildHandler(const HandlerData &handlerData)
: Handler(handlerData),
isExplicitField(false),
+ isGreedy(true),
inImplicitDefaultField(false)
{
// Register all user defined tokens if this has not yet been done
@@ -508,8 +509,13 @@ bool DocumentChildHandler::startAnnotation(Variant::mapType &args)
return true;
}
-bool DocumentChildHandler::startToken(Handle<Node> node)
+bool DocumentChildHandler::startToken(Handle<Node> node, bool greedy)
{
+ // Copy the "greedy" flag. If not greedy, set the inImplicitDefaultField
+ // flag to true, in order to push the tokens of the previous command.
+ isGreedy = greedy;
+ inImplicitDefaultField = !greedy;
+
bool isStruct = node->isa(&RttiTypes::StructuredClass);
// bool isField = node->isa(&RttiTypes::FieldDescriptor);
// bool isAnnotation = node->isa(&RttiTypes::AnnotationClass);