Core lexer/parser for MiniScript
npm install miniscript-core
Basic Lexer and Parser for MiniScript.
``bash`
npm install --save miniscript-core
- validator - define custom validatortabWidth
- - define the used tab width in fileunsafe
- - will parse invalid MiniScript without throwing (useful for debugging)
`ts`
const content = 'print "hello world"';
const lexer = new Lexer(content);
const parser = new Parser(content, { lexer });
const payload = parser.parseChunk(); // AST
- 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)
`ts``
const content = 'print "hello world"';
const parser = new Parser(content);
const payload = parser.parseChunk(); // AST