Add wasm tests for lookahead iterator

This commit is contained in:
Daumantas Kavolis 2023-06-16 11:33:00 +03:00
parent ab788619ca
commit e2094ef202
2 changed files with 40 additions and 2 deletions

View file

@ -1013,7 +1013,7 @@ class LookaheadIterable {
}
reset(language, stateId) {
if (C._ts_lookahead_iterator_reset(this[0], language, stateId)) {
if (C._ts_lookahead_iterator_reset(this[0], language[0], stateId)) {
this.language = language;
return true;
}
@ -1028,7 +1028,7 @@ class LookaheadIterable {
if (C._ts_lookahead_iterator_advance(self[0])) {
return { done: false, value: self.currentType };
}
return { done: true, value: "" };
}
};