Implemented “beautify” command.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include <plasp-app/commands/CommandBeautify.h>
|
||||
#include <plasp-app/commands/CommandHelp.h>
|
||||
#include <plasp-app/commands/CommandNormalize.h>
|
||||
#include <plasp-app/commands/CommandTranslate.h>
|
||||
@@ -21,7 +22,7 @@ enum class CommandType
|
||||
Version,
|
||||
CheckSyntax,
|
||||
Requirements,
|
||||
PrettyPrint,
|
||||
Beautify,
|
||||
Normalize,
|
||||
Translate
|
||||
};
|
||||
@@ -38,7 +39,7 @@ static const std::map<std::string, CommandType> commandNames =
|
||||
{"--version", CommandType::Version},
|
||||
{"check-syntax", CommandType::CheckSyntax},
|
||||
{"requirements", CommandType::Requirements},
|
||||
{"pretty-print", CommandType::PrettyPrint},
|
||||
{"beautify", CommandType::Beautify},
|
||||
{"normalize", CommandType::Normalize},
|
||||
{"translate", CommandType::Translate},
|
||||
};
|
||||
@@ -58,7 +59,7 @@ const auto parseCommandType =
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using AvailableCommands = std::tuple<CommandTranslate, CommandNormalize, CommandHelp, CommandVersion>;
|
||||
using AvailableCommands = std::tuple<CommandTranslate, CommandNormalize, CommandBeautify, CommandHelp, CommandVersion>;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
25
app/include/plasp-app/commands/CommandBeautify.h
Normal file
25
app/include/plasp-app/commands/CommandBeautify.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef __PLASP_APP__COMMANDS__COMMAND_BEAUTIFY_H
|
||||
#define __PLASP_APP__COMMANDS__COMMAND_BEAUTIFY_H
|
||||
|
||||
#include <plasp-app/Command.h>
|
||||
#include <plasp-app/OptionGroups.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Command Beautify
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CommandBeautify : public Command<CommandBeautify, OptionGroupBasic, OptionGroupOutput, OptionGroupParser>
|
||||
{
|
||||
public:
|
||||
static constexpr auto Name = "beautify";
|
||||
static constexpr auto Description = "Cleanly format PDDL specifications";
|
||||
|
||||
public:
|
||||
int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user