@jeanbenitez/boolast
v0.0.5
Published
A very simple logical expression parser to obtain the AST, using JISON.
Maintainers
Readme
Bool AST
A simple logical expression parser to obtain the AST, using Jison.
Installation
npm i @jeanbenitez/boolastSupported logical operators
ORAND()Parentheses
Usage
import { parser } from '@jeanbenitez/boolast';
console.log(parser.parse('REQUIRED OR MANDATORY'));Output:
{
type: 'OPERATION',
left: {
type: 'LITERAL',
name: 'REQUIRED'
},
op: 'OR',
right: {
type: 'LITERAL',
name: 'MANDATORY'
}
}