@bablr/bablr-vm 0.23.8 → 0.23.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,11 +131,13 @@ function* __stringEqual(str, iterable) {
131
131
  let strStep = strIter.next();
132
132
  step = iter.next();
133
133
 
134
- while (!strStep.done) {
134
+ while (true) {
135
135
  if (step instanceof Promise) {
136
136
  step = yield wait(step);
137
137
  }
138
138
 
139
+ if (strStep.done) break;
140
+
139
141
  if (step.value !== strStep.value) {
140
142
  step = iter.return();
141
143
  if (step instanceof Promise) {
@@ -166,9 +168,11 @@ export const match = (pattern, source) => {
166
168
  ? [buildOpenNodeTag(tokenFlags), buildLiteralTag(pattern), buildCloseNodeTag()]
167
169
  : null;
168
170
  } else if (typeof pattern === 'string') {
169
- return stringEqual(pattern, source)
170
- ? [buildOpenNodeTag(tokenFlags), buildLiteralTag(pattern), buildCloseNodeTag()]
171
- : null;
171
+ return maybeWait(stringEqual(pattern, source), (equal) => {
172
+ return equal
173
+ ? [buildOpenNodeTag(tokenFlags), buildLiteralTag(pattern), buildCloseNodeTag()]
174
+ : null;
175
+ });
172
176
  }
173
177
 
174
178
  const pattern_ =
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bablr/bablr-vm",
3
3
  "description": "A VM for parsing using BABLR languages",
4
- "version": "0.23.8",
4
+ "version": "0.23.9",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",
7
7
  "files": [