Basic Lexer and Parser for MiniScript.
npm install --save miniscript-core
-
validator
- define custom validator -
tabWidth
- define the used tab width in file -
unsafe
- will parse invalid MiniScript without throwing (useful for debugging)
const content = 'print "hello world"';
const lexer = new Lexer(content);
const parser = new Parser(content, { lexer });
const payload = parser.parseChunk(); // AST
-
validator
- define custom validator -
astProvider
- define custom ast provider -
lexer
- define custom lexer -
tabWidth
- define the used tab width in file -
unsafe
- will parse invalid MiniScript without throwing (useful for debugging)
const content = 'print "hello world"';
const parser = new Parser(content);
const payload = parser.parseChunk(); // AST