lann / wasm-wave

Web Assembly Value Encoding
Apache License 2.0
38 stars 6 forks source link

Fix `from_str` to diagnose unexpected text at the end of the string. #7

Closed sunfishcode closed 11 months ago

sunfishcode commented 11 months ago

Ensure that from_str fails on a string like "ok(1)" when parsing for a type like result. After the parser parses the "ok" part, test whether we've reached the end of the input to see if there's additional text that we haven't parsed yet.

And add more tests for parsing options and results.