sys: Added clang-format file, formatted entire project

This commit is contained in:
WerWolv
2022-01-24 20:53:17 +01:00
parent a66fec489c
commit 0e08b0226b
168 changed files with 5178 additions and 4866 deletions

View File

@@ -12,7 +12,9 @@
#include <hex/pattern_language/log_console.hpp>
#include <hex/pattern_language/token.hpp>
namespace hex::prv { class Provider; }
namespace hex::prv {
class Provider;
}
namespace hex::pl {
@@ -30,31 +32,21 @@ namespace hex::pl {
PatternLanguage();
~PatternLanguage();
[[nodiscard]]
std::optional<std::vector<ASTNode*>> parseString(const std::string &code);
[[nodiscard]]
std::optional<std::vector<PatternData*>> executeString(prv::Provider *provider, const std::string &string, const std::map<std::string, Token::Literal> &envVars = { }, const std::map<std::string, Token::Literal> &inVariables = { });
[[nodiscard]]
std::optional<std::vector<PatternData*>> executeFile(prv::Provider *provider, const fs::path &path, const std::map<std::string, Token::Literal> &envVars = { }, const std::map<std::string, Token::Literal> &inVariables = { });
[[nodiscard]]
const std::vector<ASTNode*>& getCurrentAST() const;
[[nodiscard]] std::optional<std::vector<ASTNode *>> parseString(const std::string &code);
[[nodiscard]] std::optional<std::vector<PatternData *>> executeString(prv::Provider *provider, const std::string &string, const std::map<std::string, Token::Literal> &envVars = {}, const std::map<std::string, Token::Literal> &inVariables = {});
[[nodiscard]] std::optional<std::vector<PatternData *>> executeFile(prv::Provider *provider, const fs::path &path, const std::map<std::string, Token::Literal> &envVars = {}, const std::map<std::string, Token::Literal> &inVariables = {});
[[nodiscard]] const std::vector<ASTNode *> &getCurrentAST() const;
void abort();
[[nodiscard]]
const std::vector<std::pair<LogConsole::Level, std::string>>& getConsoleLog();
[[nodiscard]]
const std::optional<std::pair<u32, std::string>>& getError();
[[nodiscard]]
std::map<std::string, Token::Literal> getOutVariables() const;
[[nodiscard]] const std::vector<std::pair<LogConsole::Level, std::string>> &getConsoleLog();
[[nodiscard]] const std::optional<std::pair<u32, std::string>> &getError();
[[nodiscard]] std::map<std::string, Token::Literal> getOutVariables() const;
[[nodiscard]]
u32 getCreatedPatternCount();
[[nodiscard]]
u32 getMaximumPatternCount();
[[nodiscard]] u32 getCreatedPatternCount();
[[nodiscard]] u32 getMaximumPatternCount();
[[nodiscard]]
bool hasDangerousFunctionBeenCalled() const;
[[nodiscard]] bool hasDangerousFunctionBeenCalled() const;
void allowDangerousFunctions(bool allow);
private:
@@ -64,7 +56,7 @@ namespace hex::pl {
Validator *m_validator;
Evaluator *m_evaluator;
std::vector<ASTNode*> m_currAST;
std::vector<ASTNode *> m_currAST;
std::optional<std::pair<u32, std::string>> m_currError;
};