summaryrefslogtreecommitdiff
path: root/src/core/parser/stack/DocumentHandler.cpp
diff options
context:
space:
mode:
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);