From 2de08643afdb4771ef8d1f6dd836ded20db244cf Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Wed, 18 Feb 2015 11:32:23 +0100 Subject: Fix for issue #85 -- only allowing explicit fields if no structure elements or data have been given beforehand. Added unit tests. --- src/core/parser/ParserScope.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core/parser/ParserScope.hpp') diff --git a/src/core/parser/ParserScope.hpp b/src/core/parser/ParserScope.hpp index fa78c17..e27c81e 100644 --- a/src/core/parser/ParserScope.hpp +++ b/src/core/parser/ParserScope.hpp @@ -286,7 +286,13 @@ enum class ParserFlag { * Set to the boolean value "true" if the head section of a file has passed. * This happens once the first non-import tag is reached. */ - POST_HEAD + POST_HEAD, + + /** + * Set to the boolean value "true" if explicit fields may no longer be + * defined inside a structure element. + */ + POST_EXPLICIT_FIELDS }; /** @@ -797,6 +803,7 @@ public: bool resolveFieldDescriptor(const std::string &name, Handle owner, Logger &logger, ResolutionResultCallback resultCallback); + /** * Tries to resolve all currently deferred resolution steps. The list of * pending deferred resolutions is cleared after this function has run. -- cgit v1.2.3