sumer
v0.0.4
Published
Sumer is a bash parser written in JavaScript.
Downloads
5
Readme
sumer
sumer
is a bash parser written in JavaScript according to bash-tree.
Install
$ npm install sumer
Usage
import {
parse,
tokenize
} from 'sumer'
const code = 'export PARSER=sumer'
const AST = parse(code, options)
const tokens = [...tokenize(code, options)]
parse(code, options)
Returns the Abstract Syntax Tree.
tokenize(code, options)
Returns an Iterator<Token>
License
MIT
Credits
Heavily based on acorn
.