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.
12 lines
366 B
JavaScript
12 lines
366 B
JavaScript
"use strict";
|
|
|
|
const { either, EndOfInput } = require("../../operations");
|
|
const untilDelimiter = require("../../combinator/until-delimiter");
|
|
const makeNewlineVariants = require("./_make-newline-variants");
|
|
|
|
module.exports = makeNewlineVariants((Newline) => {
|
|
return function* RestOfLine() {
|
|
return yield untilDelimiter(either([ Newline, EndOfInput ]));
|
|
}
|
|
});
|