import { Lexer as c } from "./lexer_public.js";
import { tokenStructuredMatcher as h, augmentTokenTypes as L } from "./tokens.js";
import S from "../../../../../../lodash-es@4.17.21/node_modules/lodash-es/isString.js";
import l from "../../../../../../lodash-es@4.17.21/node_modules/lodash-es/isUndefined.js";
import r from "../../../../../../lodash-es@4.17.21/node_modules/lodash-es/has.js";
function U(e) {
  return k(e) ? e.LABEL : e.name;
}
function k(e) {
  return S(e.LABEL) && e.LABEL !== "";
}
const I = "parent", o = "categories", s = "label", a = "group", E = "push_mode", p = "pop_mode", u = "longer_alt", T = "line_breaks", m = "start_chars_hint";
function P(e) {
  return d(e);
}
function d(e) {
  const n = e.pattern, t = {};
  if (t.name = e.name, l(n) || (t.PATTERN = n), r(e, I))
    throw `The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;
  return r(e, o) && (t.CATEGORIES = e[o]), L([t]), r(e, s) && (t.LABEL = e[s]), r(e, a) && (t.GROUP = e[a]), r(e, p) && (t.POP_MODE = e[p]), r(e, E) && (t.PUSH_MODE = e[E]), r(e, u) && (t.LONGER_ALT = e[u]), r(e, T) && (t.LINE_BREAKS = e[T]), r(e, m) && (t.START_CHARS_HINT = e[m]), t;
}
const N = P({ name: "EOF", pattern: c.NA });
L([N]);
function b(e, n, t, i, A, _, O, R) {
  return {
    image: n,
    startOffset: t,
    endOffset: i,
    startLine: A,
    endLine: _,
    startColumn: O,
    endColumn: R,
    tokenTypeIdx: e.tokenTypeIdx,
    tokenType: e
  };
}
function x(e, n) {
  return h(e, n);
}
export {
  N as EOF,
  P as createToken,
  b as createTokenInstance,
  k as hasTokenLabel,
  U as tokenLabel,
  x as tokenMatcher
};
