Skip to content

comuns-rpgmaker/schach-parsing

Repository files navigation

Schach - Parsing

Docs Tests codecov

This plugin provides a core library with Parsing functionality.

Example usage:

const { expression, evaluate } = Schach.Parsing.Arithmetic;

const { parsed: expr } = expression().run("#x^4 - log2(#y)")

evaluate(expr, { variables: { x: 5, y: 32 } })
// returns 5^4 - log2(32) = 625 - 5 = 620

Getting Started (Developers)

First of all, make sure you run npm install to install all the dependencies for the project, such as rollup.js and typescript.

Once you are done, npm run build will create a JS file for your plugin as dist/js/plugins/schach-parsing.js.