"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["node_modules_codemirror_legacy-modes_mode_mumps_js"],{

/***/ "../node_modules/@codemirror/legacy-modes/mode/mumps.js":
/*!**************************************************************!*\
  !*** ../node_modules/@codemirror/legacy-modes/mode/mumps.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   mumps: () => (/* binding */ mumps)\n/* harmony export */ });\nfunction wordRegexp(words) {\n  return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\", \"i\");\n}\n\nvar singleOperators = new RegExp(\"^[\\\\+\\\\-\\\\*/&#!_?\\\\\\\\<>=\\\\'\\\\[\\\\]]\");\nvar doubleOperators = new RegExp(\"^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))\");\nvar singleDelimiters = new RegExp(\"^[\\\\.,:]\");\nvar brackets = new RegExp(\"[()]\");\nvar identifiers = new RegExp(\"^[%A-Za-z][A-Za-z0-9]*\");\nvar commandKeywords = [\"break\",\"close\",\"do\",\"else\",\"for\",\"goto\", \"halt\", \"hang\", \"if\", \"job\",\"kill\",\"lock\",\"merge\",\"new\",\"open\", \"quit\", \"read\", \"set\", \"tcommit\", \"trollback\", \"tstart\", \"use\", \"view\", \"write\", \"xecute\", \"b\",\"c\",\"d\",\"e\",\"f\",\"g\", \"h\", \"i\", \"j\",\"k\",\"l\",\"m\",\"n\",\"o\", \"q\", \"r\", \"s\", \"tc\", \"tro\", \"ts\", \"u\", \"v\", \"w\", \"x\"];\n// The following list includes intrinsic functions _and_ special variables\nvar intrinsicFuncsWords = [\"\\\\$ascii\", \"\\\\$char\", \"\\\\$data\", \"\\\\$ecode\", \"\\\\$estack\", \"\\\\$etrap\", \"\\\\$extract\", \"\\\\$find\", \"\\\\$fnumber\", \"\\\\$get\", \"\\\\$horolog\", \"\\\\$io\", \"\\\\$increment\", \"\\\\$job\", \"\\\\$justify\", \"\\\\$length\", \"\\\\$name\", \"\\\\$next\", \"\\\\$order\", \"\\\\$piece\", \"\\\\$qlength\", \"\\\\$qsubscript\", \"\\\\$query\", \"\\\\$quit\", \"\\\\$random\", \"\\\\$reverse\", \"\\\\$select\", \"\\\\$stack\", \"\\\\$test\", \"\\\\$text\", \"\\\\$translate\", \"\\\\$view\", \"\\\\$x\", \"\\\\$y\", \"\\\\$a\", \"\\\\$c\", \"\\\\$d\", \"\\\\$e\", \"\\\\$ec\", \"\\\\$es\", \"\\\\$et\", \"\\\\$f\", \"\\\\$fn\", \"\\\\$g\", \"\\\\$h\", \"\\\\$i\", \"\\\\$j\", \"\\\\$l\", \"\\\\$n\", \"\\\\$na\", \"\\\\$o\", \"\\\\$p\", \"\\\\$q\", \"\\\\$ql\", \"\\\\$qs\", \"\\\\$r\", \"\\\\$re\", \"\\\\$s\", \"\\\\$st\", \"\\\\$t\", \"\\\\$tr\", \"\\\\$v\", \"\\\\$z\"];\nvar intrinsicFuncs = wordRegexp(intrinsicFuncsWords);\nvar command = wordRegexp(commandKeywords);\n\nfunction tokenBase(stream, state) {\n  if (stream.sol()) {\n    state.label = true;\n    state.commandMode = 0;\n  }\n\n  // The <space> character has meaning in MUMPS. Ignoring consecutive\n  // spaces would interfere with interpreting whether the next non-space\n  // character belongs to the command or argument context.\n\n  // Examine each character and update a mode variable whose interpretation is:\n  //   >0 => command    0 => argument    <0 => command post-conditional\n  var ch = stream.peek();\n\n  if (ch == \" \" || ch == \"\\t\") { // Pre-process <space>\n    state.label = false;\n    if (state.commandMode == 0)\n      state.commandMode = 1;\n    else if ((state.commandMode < 0) || (state.commandMode == 2))\n      state.commandMode = 0;\n  } else if ((ch != \".\") && (state.commandMode > 0)) {\n    if (ch == \":\")\n      state.commandMode = -1;   // SIS - Command post-conditional\n    else\n      state.commandMode = 2;\n  }\n\n  // Do not color parameter list as line tag\n  if ((ch === \"(\") || (ch === \"\\u0009\"))\n    state.label = false;\n\n  // MUMPS comment starts with \";\"\n  if (ch === \";\") {\n    stream.skipToEnd();\n    return \"comment\";\n  }\n\n  // Number Literals // SIS/RLM - MUMPS permits canonic number followed by concatenate operator\n  if (stream.match(/^[-+]?\\d+(\\.\\d+)?([eE][-+]?\\d+)?/))\n    return \"number\";\n\n  // Handle Strings\n  if (ch == '\"') {\n    if (stream.skipTo('\"')) {\n      stream.next();\n      return \"string\";\n    } else {\n      stream.skipToEnd();\n      return \"error\";\n    }\n  }\n\n  // Handle operators and Delimiters\n  if (stream.match(doubleOperators) || stream.match(singleOperators))\n    return \"operator\";\n\n  // Prevents leading \".\" in DO block from falling through to error\n  if (stream.match(singleDelimiters))\n    return null;\n\n  if (brackets.test(ch)) {\n    stream.next();\n    return \"bracket\";\n  }\n\n  if (state.commandMode > 0 && stream.match(command))\n    return \"controlKeyword\";\n\n  if (stream.match(intrinsicFuncs))\n    return \"builtin\";\n\n  if (stream.match(identifiers))\n    return \"variable\";\n\n  // Detect dollar-sign when not a documented intrinsic function\n  // \"^\" may introduce a GVN or SSVN - Color same as function\n  if (ch === \"$\" || ch === \"^\") {\n    stream.next();\n    return \"builtin\";\n  }\n\n  // MUMPS Indirection\n  if (ch === \"@\") {\n    stream.next();\n    return \"string.special\";\n  }\n\n  if (/[\\w%]/.test(ch)) {\n    stream.eatWhile(/[\\w%]/);\n    return \"variable\";\n  }\n\n  // Handle non-detected items\n  stream.next();\n  return \"error\";\n}\n\nconst mumps = {\n  name: \"mumps\",\n  startState: function() {\n    return {\n      label: false,\n      commandMode: 0\n    };\n  },\n\n  token: function(stream, state) {\n    var style = tokenBase(stream, state);\n    if (state.label) return \"tag\";\n    return style;\n  }\n};\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@codemirror/legacy-modes/mode/mumps.js?");

/***/ })

}]);