sys: Updated to new pattern language library structure

This commit is contained in:
WerWolv
2022-08-06 21:38:09 +02:00
parent 4f37345324
commit 88f8bb9848
10 changed files with 115 additions and 116 deletions

View File

@@ -2,18 +2,18 @@
#include <hex/helpers/net.hpp>
#include <pl/token.hpp>
#include <pl/log_console.hpp>
#include <pl/evaluator.hpp>
#include <pl/core/token.hpp>
#include <pl/core/log_console.hpp>
#include <pl/core/evaluator.hpp>
#include <pl/patterns/pattern.hpp>
namespace hex::plugin::builtin {
void registerPatternLanguageFunctions() {
using namespace pl;
using namespace pl::core;
using FunctionParameterCount = pl::api::FunctionParameterCount;
api::Namespace nsStdHttp = { "builtin", "std", "http" };
pl::api::Namespace nsStdHttp = { "builtin", "std", "http" };
{
/* get(url) */
ContentRegistry::PatternLanguage::addDangerousFunction(nsStdHttp, "get", FunctionParameterCount::exactly(1), [](Evaluator *, auto params) -> std::optional<Token::Literal> {