miniscript-core
v1.1.1
Published
Core lexer/parser for MiniScript
Downloads
1,057
Readme
miniscript-core
Basic Lexer and Parser for MiniScript.
Install
npm install --save miniscript-core
Lexer
Options
validator
- define custom validatortabWidth
- define the used tab width in fileunsafe
- will parse invalid MiniScript without throwing (useful for debugging)
Usage
const content = 'print "hello world"';
const lexer = new Lexer(content);
const parser = new Parser(content, { lexer });
const payload = parser.parseChunk(); // AST
Parser
Options
validator
- define custom validatorastProvider
- define custom ast providerlexer
- define custom lexertabWidth
- define the used tab width in fileunsafe
- will parse invalid MiniScript without throwing (useful for debugging)
Usage
const content = 'print "hello world"';
const parser = new Parser(content);
const payload = parser.parseChunk(); // AST