-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get tokens or ast from wast code #799
Comments
AchalaSB
changed the title
Unable to get ast from wast code
Unable to get tokens or ast from wast code
Sep 1, 2020
@xtuc is there any specific grammar the library looking for? how can convert my wasm/wast code ? |
Hello, I meet the same question! Did you figure this problem out? |
I just to reproduce and got a different error:
It looks like we fail to parse the comment in text format. However, the wasm-parser decoded the file, my test is: const { decode } = require("@webassemblyjs/wasm-parser");
const { readFileSync } = require("fs")
const binary = readFileSync("target/wasm32-unknown-unknown/release/testff.wasm")
const decoderOpts = {};
const ast = decode(binary, decoderOpts);
console.log(ast); |
xtuc
added a commit
that referenced
this issue
Jan 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When I try to get at form wat code, I'm getting errors
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should generate the tokens or ast in json form
Actual result
Getting error because of grammar( the generate wast file format is different than what this library expected)
Have tried
wasm-parser
as well, even that didn't workHow can get wasm/wat file that is fit to this library?
The text was updated successfully, but these errors were encountered: