rylev / wepl

A repl for WebAssembly Components
Apache License 2.0
105 stars 7 forks source link

fix parsing multiple arg tokens #22

Closed FrankReh closed 4 months ago

FrankReh commented 4 months ago

The Comma token needs to be popped in order to move the logic forward and let the loop work on the next token.

FrankReh commented 4 months ago

When I tried running the exported 'add' function from the "add.wasm" file found in https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/example-host the second argument, already having been tokenized, was not being picked up properly by the loop in question.

Popping the Comma token fixed things up and I was able to use the Wasm Component REPL to add to integers together.

FrankReh commented 4 months ago

I guess waiting for your merge?