0.0.5 • Published 4 years ago

@jeanbenitez/boolast v0.0.5

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

Bool AST

A simple logical expression parser to obtain the AST, using Jison.

Installation

npm i @jeanbenitez/boolast

Supported logical operators

  1. OR
  2. AND
  3. () 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'
  }
}
0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago