Handling unsupported preferences in preconditions.

This commit is contained in:
Patrick Lühne 2017-06-17 18:37:57 +02:00
parent f4c1d65365
commit 14c498c539
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -39,14 +39,8 @@ std::experimental::optional<ast::Precondition> parsePrecondition(Context &contex
tokenizer.expect<std::string>("("); tokenizer.expect<std::string>("(");
const auto expressionIdentifierPosition = tokenizer.position(); if (tokenizer.testIdentifierAndReturn("preference"))
if (tokenizer.testIdentifierAndSkip("preference"))
{ {
// TODO: refactor
tokenizer.seek(expressionIdentifierPosition);
const auto expressionIdentifier = tokenizer.getIdentifier();
tokenizer.seek(position); tokenizer.seek(position);
return parseUnsupported(context); return parseUnsupported(context);
} }