{"version":3,"file":"protobuf-zKe6cAIt.cjs","sources":["../../../node_modules/@codemirror/legacy-modes/mode/protobuf.js"],"sourcesContent":["function wordRegexp(words) {\n  return new RegExp(\"^((\" + words.join(\")|(\") + \"))\\\\b\", \"i\");\n};\n\nvar keywordArray = [\n  \"package\", \"message\", \"import\", \"syntax\",\n  \"required\", \"optional\", \"repeated\", \"reserved\", \"default\", \"extensions\", \"packed\",\n  \"bool\", \"bytes\", \"double\", \"enum\", \"float\", \"string\",\n  \"int32\", \"int64\", \"uint32\", \"uint64\", \"sint32\", \"sint64\", \"fixed32\", \"fixed64\", \"sfixed32\", \"sfixed64\",\n  \"option\", \"service\", \"rpc\", \"returns\"\n];\nvar keywords = wordRegexp(keywordArray);\n\nvar identifiers = new RegExp(\"^[_A-Za-z\\xa1-\\uffff][_A-Za-z0-9\\xa1-\\uffff]*\");\n\nfunction tokenBase(stream) {\n  // whitespaces\n  if (stream.eatSpace()) return null;\n\n  // Handle one line Comments\n  if (stream.match(\"//\")) {\n    stream.skipToEnd();\n    return \"comment\";\n  }\n\n  // Handle Number Literals\n  if (stream.match(/^[0-9\\.+-]/, false)) {\n    if (stream.match(/^[+-]?0x[0-9a-fA-F]+/))\n      return \"number\";\n    if (stream.match(/^[+-]?\\d*\\.\\d+([EeDd][+-]?\\d+)?/))\n      return \"number\";\n    if (stream.match(/^[+-]?\\d+([EeDd][+-]?\\d+)?/))\n      return \"number\";\n  }\n\n  // Handle Strings\n  if (stream.match(/^\"([^\"]|(\"\"))*\"/)) { return \"string\"; }\n  if (stream.match(/^'([^']|(''))*'/)) { return \"string\"; }\n\n  // Handle words\n  if (stream.match(keywords)) { return \"keyword\"; }\n  if (stream.match(identifiers)) { return \"variable\"; } ;\n\n  // Handle non-detected items\n  stream.next();\n  return null;\n};\n\nexport const protobuf = {\n  name: \"protobuf\",\n  token: tokenBase,\n  languageData: {\n    autocomplete: keywordArray\n  }\n}\n"],"names":["keywordArray","keywords","RegExp","join","identifiers","protobuf","name","token","stream","eatSpace","match","skipToEnd","next","languageData","autocomplete"],"mappings":"gFAIA,IAAIA,EAAe,CACjB,UAAW,UAAW,SAAU,SAChC,WAAY,WAAY,WAAY,WAAY,UAAW,aAAc,SACzE,OAAQ,QAAS,SAAU,OAAQ,QAAS,SAC5C,QAAS,QAAS,SAAU,SAAU,SAAU,SAAU,UAAW,UAAW,WAAY,WAC5F,SAAU,UAAW,MAAO,WAE1BC,EAVK,IAAIC,OAAO,MAUMF,EAVQG,KAAK,OAAS,QAAS,KAYrDC,EAAc,IAAIF,OAAO,iCAmCjB,MAACG,EAAW,CACtBC,KAAM,WACNC,MAnCF,SAAmBC,GAEjB,GAAIA,EAAOC,WAAY,OAAO,KAG9B,GAAID,EAAOE,MAAM,MAEf,OADAF,EAAOG,YACA,UAIT,GAAIH,EAAOE,MAAM,cAAc,GAAQ,CACrC,GAAIF,EAAOE,MAAM,wBACf,MAAO,SACT,GAAIF,EAAOE,MAAM,mCACf,MAAO,SACT,GAAIF,EAAOE,MAAM,8BACf,MAAO,QACX,CAGA,OAAIF,EAAOE,MAAM,oBACbF,EAAOE,MAAM,mBAD6B,SAI1CF,EAAOE,MAAMT,GAAoB,UACjCO,EAAOE,MAAMN,GAAuB,YAGxCI,EAAOI,OACA,KACT,EAKEC,aAAc,CACZC,aAAcd","x_google_ignoreList":[0]}