Made unsupported expressions a separate type for disambiguation to fix issues with unsupported features.
This commit is contained in:
@@ -62,6 +62,9 @@ class PrimitiveType;
|
||||
using PrimitiveTypePointer = std::unique_ptr<PrimitiveType>;
|
||||
using PrimitiveTypes = std::vector<PrimitiveTypePointer>;
|
||||
|
||||
class Unsupported;
|
||||
using UnsupportedPointer = std::unique_ptr<Unsupported>;
|
||||
|
||||
class Variable;
|
||||
using VariablePointer = std::unique_ptr<Variable>;
|
||||
using Variables = std::vector<VariablePointer>;
|
||||
@@ -85,6 +88,7 @@ class Expression
|
||||
PredicateDeclaration,
|
||||
Predicate,
|
||||
PrimitiveType,
|
||||
Unsupported,
|
||||
Variable
|
||||
};
|
||||
|
||||
|
40
include/plasp/pddl/expressions/Unsupported.h
Normal file
40
include/plasp/pddl/expressions/Unsupported.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef __PLASP__PDDL__EXPRESSIONS__UNSUPPORTED_H
|
||||
#define __PLASP__PDDL__EXPRESSIONS__UNSUPPORTED_H
|
||||
|
||||
#include <plasp/pddl/Context.h>
|
||||
#include <plasp/pddl/Expression.h>
|
||||
|
||||
namespace plasp
|
||||
{
|
||||
namespace pddl
|
||||
{
|
||||
namespace expressions
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Unsupported
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Unsupported: public ExpressionCRTP<Unsupported>
|
||||
{
|
||||
public:
|
||||
static const Expression::Type ExpressionType = Expression::Type::Unsupported;
|
||||
|
||||
static UnsupportedPointer parse(Context &context);
|
||||
|
||||
public:
|
||||
const std::string &type() const;
|
||||
|
||||
private:
|
||||
std::string m_type;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user