From 14c498c53901aeb03aaa74324686329b4a706c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 17 Jun 2017 18:37:57 +0200 Subject: [PATCH] Handling unsupported preferences in preconditions. --- .../src/pddlparse/detail/parsing/Precondition.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/pddlparse/src/pddlparse/detail/parsing/Precondition.cpp b/lib/pddlparse/src/pddlparse/detail/parsing/Precondition.cpp index 44cb30c..493a02d 100644 --- a/lib/pddlparse/src/pddlparse/detail/parsing/Precondition.cpp +++ b/lib/pddlparse/src/pddlparse/detail/parsing/Precondition.cpp @@ -39,14 +39,8 @@ std::experimental::optional parsePrecondition(Context &contex tokenizer.expect("("); - const auto expressionIdentifierPosition = tokenizer.position(); - - if (tokenizer.testIdentifierAndSkip("preference")) + if (tokenizer.testIdentifierAndReturn("preference")) { - // TODO: refactor - tokenizer.seek(expressionIdentifierPosition); - const auto expressionIdentifier = tokenizer.getIdentifier(); - tokenizer.seek(position); return parseUnsupported(context); }