npm.io
0.33.0 • Published 7 years agoCLI

wast-parser

Licence
MIT
Version
0.33.0
Deps
0
Size
306 kB
Vulns
0
Weekly
0
Stars
18

WebAssembly parser

NPM version Travis appVeyor

Takes WebAssembly S-expression (WAST) string and returns abstract syntax tree (AST).

Inspired by esprima

Use

Node.js

npm i wast-parser --save
var parser = require('wast-parser');
CLI

First install globally npm i wast-parser -g
then invoke with a wast file wast-parser <path/to/wast/file> > parsed_wast.json

Functions

.parse()
var ast = parser.parse('(module)');

Testing

npm test

Generating tests

npm run testgen

License

MIT LICENSE.

Keywords