Hi @everyone,

I need assistance with using the "wat2wasm" conversion tool correctly.

- For demonstration, I have chosen the file "left-to-right.wast," available [here](https://github.com/WebAssembly/testsuite/blob/dc27dad3e34e466bdbfea32fe3c73f5e31f88560/left-to-right.wast).

- When using the "wat2wasm" tool, I encountered an error: "error: unexpected token" at line 181, as depicted in this screenshot: 

![Error Screenshot](https://i.imgur.com/8m2dXyn.png).

- For testing purposes, I eliminated all statements after line 180. The modified file is shown here: 

![Testing Snapshot](https://i.imgur.com/poeS0yB.png).

- This change allowed the tool to function correctly, as seen in this screenshot: 

![Successful Result](https://i.imgur.com/lwLSqmN.png).

- I noticed similar results with these tools:

- [demo/wat2wasm](https://webassembly.github.io/wabt/demo/wat2wasm/)

  ![Tool Screenshot](https://i.imgur.com/LKj2kY5.png)

- [bytecodealliance/wasm-tools](https://github.com/bytecodealliance/wasm-tools)

  ![Tool Screenshot](https://i.imgur.com/LgH3qVi.png)

- Could I be missing any specific option flags or not using the correct test specification? Your guidance would be helpful.

Need Help | wat2wasm: "error: unexpected token"
This is a GitHub Issue
repo:wabt
owner:WebAssembly
Title : Need Help | wat2wasm: "error: unexpected token"
Issue date:

--- start body ---
Hi @everyone,

I need assistance with using the "wat2wasm" conversion tool correctly.

- For demonstration, I have chosen the file "left-to-right.wast," available [here](https://github.com/WebAssembly/testsuite/blob/dc27dad3e34e466bdbfea32fe3c73f5e31f88560/left-to-right.wast).

- When using the "wat2wasm" tool, I encountered an error: "error: unexpected token" at line 181, as depicted in this screenshot: 

![Error Screenshot](https://i.imgur.com/8m2dXyn.png).

- For testing purposes, I eliminated all statements after line 180. The modified file is shown here: 

![Testing Snapshot](https://i.imgur.com/poeS0yB.png).

- This change allowed the tool to function correctly, as seen in this screenshot: 

![Successful Result](https://i.imgur.com/lwLSqmN.png).

- I noticed similar results with these tools:

- [demo/wat2wasm](https://webassembly.github.io/wabt/demo/wat2wasm/)

  ![Tool Screenshot](https://i.imgur.com/LKj2kY5.png)

- [bytecodealliance/wasm-tools](https://github.com/bytecodealliance/wasm-tools)

  ![Tool Screenshot](https://i.imgur.com/LgH3qVi.png)

- Could I be missing any specific option flags or not using the correct test specification? Your guidance would be helpful.

--- end body ---
