'use strict';

var index = require('../../../../micromark-factory-space@1.1.0/node_modules/micromark-factory-space/index.js');
require('../../../../micromark-util-character@1.2.0/node_modules/micromark-util-character/index.js');

/**
 * @typedef {import('micromark-util-types').Construct} Construct
 * @typedef {import('micromark-util-types').State} State
 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
 */

/** @type {Construct} */
const lineEnding = {
  name: 'lineEnding',
  tokenize: tokenizeLineEnding
};

/**
 * @this {TokenizeContext}
 * @type {Tokenizer}
 */
function tokenizeLineEnding(effects, ok) {
  return start

  /** @type {State} */
  function start(code) {
    effects.enter('lineEnding');
    effects.consume(code);
    effects.exit('lineEnding');
    return index.factorySpace(effects, ok, 'linePrefix')
  }
}

exports.lineEnding = lineEnding;
//# sourceMappingURL=line-ending.js.map
