"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_smalltalk_js"],{

/***/ "../node_modules/@codemirror/legacy-modes/mode/smalltalk.js":
/*!******************************************************************!*\
  !*** ../node_modules/@codemirror/legacy-modes/mode/smalltalk.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 */   \"smalltalk\": () => (/* binding */ smalltalk)\n/* harmony export */ });\nvar specialChars = /[+\\-\\/\\\\*~<>=@%|&?!.,:;^]/;\nvar keywords = /true|false|nil|self|super|thisContext/;\n\nvar Context = function(tokenizer, parent) {\n  this.next = tokenizer;\n  this.parent = parent;\n};\n\nvar Token = function(name, context, eos) {\n  this.name = name;\n  this.context = context;\n  this.eos = eos;\n};\n\nvar State = function() {\n  this.context = new Context(next, null);\n  this.expectVariable = true;\n  this.indentation = 0;\n  this.userIndentationDelta = 0;\n};\n\nState.prototype.userIndent = function(indentation, indentUnit) {\n  this.userIndentationDelta = indentation > 0 ? (indentation / indentUnit - this.indentation) : 0;\n};\n\nvar next = function(stream, context, state) {\n  var token = new Token(null, context, false);\n  var aChar = stream.next();\n\n  if (aChar === '\"') {\n    token = nextComment(stream, new Context(nextComment, context));\n\n  } else if (aChar === '\\'') {\n    token = nextString(stream, new Context(nextString, context));\n\n  } else if (aChar === '#') {\n    if (stream.peek() === '\\'') {\n      stream.next();\n      token = nextSymbol(stream, new Context(nextSymbol, context));\n    } else {\n      if (stream.eatWhile(/[^\\s.{}\\[\\]()]/))\n        token.name = 'string.special';\n      else\n        token.name = 'meta';\n    }\n\n  } else if (aChar === '$') {\n    if (stream.next() === '<') {\n      stream.eatWhile(/[^\\s>]/);\n      stream.next();\n    }\n    token.name = 'string.special';\n\n  } else if (aChar === '|' && state.expectVariable) {\n    token.context = new Context(nextTemporaries, context);\n\n  } else if (/[\\[\\]{}()]/.test(aChar)) {\n    token.name = 'bracket';\n    token.eos = /[\\[{(]/.test(aChar);\n\n    if (aChar === '[') {\n      state.indentation++;\n    } else if (aChar === ']') {\n      state.indentation = Math.max(0, state.indentation - 1);\n    }\n\n  } else if (specialChars.test(aChar)) {\n    stream.eatWhile(specialChars);\n    token.name = 'operator';\n    token.eos = aChar !== ';'; // ; cascaded message expression\n\n  } else if (/\\d/.test(aChar)) {\n    stream.eatWhile(/[\\w\\d]/);\n    token.name = 'number';\n\n  } else if (/[\\w_]/.test(aChar)) {\n    stream.eatWhile(/[\\w\\d_]/);\n    token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null;\n\n  } else {\n    token.eos = state.expectVariable;\n  }\n\n  return token;\n};\n\nvar nextComment = function(stream, context) {\n  stream.eatWhile(/[^\"]/);\n  return new Token('comment', stream.eat('\"') ? context.parent : context, true);\n};\n\nvar nextString = function(stream, context) {\n  stream.eatWhile(/[^']/);\n  return new Token('string', stream.eat('\\'') ? context.parent : context, false);\n};\n\nvar nextSymbol = function(stream, context) {\n  stream.eatWhile(/[^']/);\n  return new Token('string.special', stream.eat('\\'') ? context.parent : context, false);\n};\n\nvar nextTemporaries = function(stream, context) {\n  var token = new Token(null, context, false);\n  var aChar = stream.next();\n\n  if (aChar === '|') {\n    token.context = context.parent;\n    token.eos = true;\n\n  } else {\n    stream.eatWhile(/[^|]/);\n    token.name = 'variable';\n  }\n\n  return token;\n};\n\nconst smalltalk = {\n  name: \"smalltalk\",\n\n  startState: function() {\n    return new State;\n  },\n\n  token: function(stream, state) {\n    state.userIndent(stream.indentation(), stream.indentUnit);\n\n    if (stream.eatSpace()) {\n      return null;\n    }\n\n    var token = state.context.next(stream, state.context, state);\n    state.context = token.context;\n    state.expectVariable = token.eos;\n\n    return token.name;\n  },\n\n  blankLine: function(state, indentUnit) {\n    state.userIndent(0, indentUnit);\n  },\n\n  indent: function(state, textAfter, cx) {\n    var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta;\n    return (state.indentation + i) * cx.unit;\n  },\n\n  languageData: {\n    indentOnInput: /^\\s*\\]$/\n  }\n}\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@codemirror/legacy-modes/mode/smalltalk.js?");

/***/ })

}]);