mossgame/fivecode

PHP类,用于启用由程序性指令驱动的第五代教学代码,在后台以受控逻辑执行。

2.2.4 2021-07-05 07:05 UTC

This package is auto-updated.

Last update: 2024-09-05 13:50:25 UTC


README

用于评估称为FiveCode的第五代编程结构的PHP库。

Source Code Download Package PHP Programming Language Build Status Codecov Code Coverage Read License Package downloads on Packagist

安装

$ composer require mossengine/fivecode
{
    "require": {
        "mossengine/fivecode": "~2.0.0"
    }
}

用法

new FiveCode()

// Require the autoloader, normal composer stuff
require 'vendor/autoload.php';

// Instantiate a FiveCode class
$fiveCode = new Mossengine\FiveCode\FiveCode();

// Evaluate an array of FiveCode through the evaluate class method.
$fiveCode->evaluate([
    ['' => []],
    ['' => []],
    ['' => []],
    ['' => []]
]);

FiveCode::make()

// Require the autoloader, normal composer stuff
require 'vendor/autoload.php';

// Use the static make method and immediately evaluate an array of instructions
Mossengine\FiveCode\FiveCode::make()
    ->evaluate([
        ['' => []],
        ['' => []],
        ['' => []],
        ['' => []]
    ]);

文档

阅读文档以获取有关FiveCode语言结构的更多详细信息或创建自己的解析器/函数以提供更多功能