WebAssembly AST parser
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
results-extra fixes #35 ; param $x Aug 31, 2018
results
test
testsuite @ 0b7f000
testsuite-extra fixes #22 ; export by function reference Jun 4, 2017
.eslintrc
.gitignore gitignore package-lock.json Aug 31, 2018
.gitmodules
.travis.yml
LICENSE bumped to the new testsuit Aug 31, 2018
README.md
appveyor.yml last working appveyor node version Sep 1, 2018
package.json
wast.pegjs

README.md

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.