You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
344 B
JavaScript

"use strict";
const { until, EndOfInput } = require("./operations");
const { parse } = require("./index");
function* foo() {
yield "hello";
yield EndOfInput;
}
console.log(parse("hello", foo));
// console.log(parse("hello", until(EndOfInput)));
function* bar() {
yield until("s");
yield "s";
}
// console.log(parse("hellos", bar));