Add documentation comment to WAForth#read.

This commit is contained in:
Rick Carlino 2022-05-11 22:21:39 -05:00 committed by Remko Tronçon
parent 8f37f588c1
commit 9e30411d1b

View file

@ -190,6 +190,9 @@ class WAForth {
memory = this.core.exports.memory as WebAssembly.Memory;
}
/**
* Read data `s` into the input buffer without interpreting it.
*/
read(s: string) {
const data = new TextEncoder().encode(s);
for (let i = data.length - 1; i >= 0; --i) {