UNPKG
@webassemblyjs/wast-parser
Version:
latest (1.14.1)
1.14.1
1.13.2
1.13.1
1.12.1
1.11.6
1.11.5
1.11.3
1.11.1
1.11.0
1.10.1
1.10.0
1.9.1
1.9.0
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.11
1.7.10
1.7.9
1.7.8
1.7.7
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.2-1
1.7.2-0
1.7.1
1.7.1-0
1.7.0
1.7.0-3
1.7.0-2
1.7.0-1
1.7.0-0
1.6.1
1.6.0
1.5.13
1.5.12
1.5.11
1.5.10
1.5.9
1.5.8
1.5.7
1.5.6
1.5.5
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.3
1.4.2
1.4.1
1.4.0
1.3.3
1.3.2
1.3.1
1.3.0
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.2-y.10
1.1.2-y.9
1.1.2-y.8
1.1.2-y.7
1.1.2-y.6
1.1.2-y.5
1.1.2-y.4
1.1.2-y.3
1.1.2-y.2
1.1.2-y.1
1.1.2-y.0
1.1.1
1.1.0
1.0.0
1.0.0-y.8
1.0.0-y.7
1.0.0-y.6
1.0.0-y.5
WebAssembly text format parser
github.com/xtuc/webassemblyjs
xtuc/webassemblyjs
@webassemblyjs/wast-parser
/
esm
/
index.js
9 lines
(8 loc)
•
294 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
*
as
parser
from
"./grammar"
;
import
{ tokenize }
from
"./tokenizer"
;
export
function
parse
(
source
) {
var
tokens =
tokenize
(source);
// We pass the source here to show code frames
var
ast = parser.
parse
(tokens, source);
return
ast; }
export
*
from
"@webassemblyjs/helper-numbers"
;