ohm-js 17.0.0 → 17.0.2

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.
package/dist/ohm.cjs CHANGED
@@ -1950,9 +1950,9 @@ PExpr.prototype.eval = abstract('eval'); // function(state) { ... }
1950
1950
  any.eval = function(state) {
1951
1951
  const {inputStream} = state;
1952
1952
  const origPos = inputStream.pos;
1953
- const ch = inputStream.next();
1954
- if (ch) {
1955
- state.pushBinding(new TerminalNode(ch.length), origPos);
1953
+ const cp = inputStream.nextCodePoint();
1954
+ if (cp !== undefined) {
1955
+ state.pushBinding(new TerminalNode(String.fromCodePoint(cp).length), origPos);
1956
1956
  return true;
1957
1957
  } else {
1958
1958
  state.processFailure(origPos, this);