Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lezer-feel

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lezer-feel

Lezer-based FEEL grammar

  • 0.8.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
increased by0.32%
Maintainers
1
Weekly downloads
 
Created
Source

lezer-feel

CI

This is a DMN 1.3 FEEL grammar for the Lezer parser system.

Supports context sensitive language parsing.

Usage

Parse FEEL to a Tree:

import {
  parser
} from 'lezer-feel';

// parse <Expressions>
parser.parse('foo > 1');

// parse <UnaryTests>
parser.configure({
  top: 'UnaryTests'
}).parse('> 100');

To enable context sensitive parsing based on inputs, configure the parser accordingly:

import {
  parser,
  trackVariables
} from 'lezer-feel';

const contextTracker = trackVariables({
  'if foo then bar': 1
});

const contextualParser = parser.configure({
  contextTracker
});

// recognizes <if foo then bar> as a <VariableName>
contextualParser.parse('if foo then bar');

License

The code is licensed under an MIT license.

FAQs

Package last updated on 31 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc