diff --git a/lib/pddlparse/src/pddlparse/detail/parsing/Action.cpp b/lib/pddlparse/src/pddlparse/detail/parsing/Action.cpp index af4e333..774024e 100644 --- a/lib/pddlparse/src/pddlparse/detail/parsing/Action.cpp +++ b/lib/pddlparse/src/pddlparse/detail/parsing/Action.cpp @@ -150,11 +150,10 @@ void ActionParser::parsePreconditionSection(ast::Action &action) tokenizer.expect(":precondition"); + ASTContext astContext(m_domain); VariableStack variableStack; variableStack.push(&action.parameters); - ASTContext astContext(m_domain); - action.precondition = parsePrecondition(m_context, astContext, variableStack); } @@ -166,11 +165,10 @@ void ActionParser::parseEffectSection(ast::Action &action) tokenizer.expect(":effect"); + ASTContext astContext(m_domain); VariableStack variableStack; variableStack.push(&action.parameters); - ASTContext astContext(m_domain); - action.effect = parseEffect(m_context, astContext, variableStack); }