@vjeko.com/al-parser
v0.25.2
Published
AL Language Parser
Downloads
12
Readme
AL Language Parser
This directory contains the parser as an independent Node.js package. This parser is the core component of
@vjeko.com/al-parser-*
group of packages. All other components depend on it, and use it to provide the
parsing functionality.
Depending on your scenario, this component may or may not be the right choice for you to use. Use this component if:
- You are running the parser from the browser and you cannot benefit from Node.js multi-threading capability
- You will only ever parse one document at a time, and parsing performance is already good enough
If you both need a high-performance parser and your project runs on Node.js runtime, then take use the
@vjeko.com/al-parser-node
package that provides multi-threading capability, and can often provide far
better performance.
As a benchmark, you can expect ~1ms per object with single-threaded parser (this component) and ~0.15ms per object with multi-threaded parser.
AL Language Support
Supports version of AL up to BC version 25.x.
Installation
To install the parser, run:
npm install @vjeko.com/al-parser
This will install the parser as a dependency to your project.
Usage
Using the parser is simple:
import { Parser } from "@vjeko.com/al-parser";
let parser = new Parser("codeunit 1 TestParser {}");
let objects = parser.parseObjects();