mossengine/fivecode-parsers-maths

A Parser for the FiveCode library that provides math based logical instructions.

1.0.1 2021-07-05 14:08 UTC

This package is auto-updated.

Last update: 2024-11-05 21:25:14 UTC


README

A Parser for the FiveCode library that provides math based logical instructions.

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

Installation

$ composer require mossengine/fivecode-parsers-maths ^1.0.0
{
    "require": {
        "mossengine/fivecode-parsers-maths": "^1.0.0"
    }
}

Usage

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

Mossengine\FiveCode\FiveCode::make([
    'parsers' => [
        'include' => [
            Mossengine\FiveCode\Parsers\Maths::class
        ]
    ],
])
    ->evaluate([
        ['maths.addition' => [
            1,
            2
        ]]
    ])
    ->return(0);

Documentation

Read the docs for more details on FiveCode language structure