redis.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. "use strict";
  2. /*!-----------------------------------------------------------------------------
  3. * Copyright (c) Microsoft Corporation. All rights reserved.
  4. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  5. * Released under the MIT license
  6. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  7. *-----------------------------------------------------------------------------*/
  8. define("vs/basic-languages/redis/redis", ["require"],(require)=>{
  9. var moduleExports = (() => {
  10. var __defProp = Object.defineProperty;
  11. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  12. var __getOwnPropNames = Object.getOwnPropertyNames;
  13. var __hasOwnProp = Object.prototype.hasOwnProperty;
  14. var __export = (target, all) => {
  15. for (var name in all)
  16. __defProp(target, name, { get: all[name], enumerable: true });
  17. };
  18. var __copyProps = (to, from, except, desc) => {
  19. if (from && typeof from === "object" || typeof from === "function") {
  20. for (let key of __getOwnPropNames(from))
  21. if (!__hasOwnProp.call(to, key) && key !== except)
  22. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  23. }
  24. return to;
  25. };
  26. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  27. // src/basic-languages/redis/redis.ts
  28. var redis_exports = {};
  29. __export(redis_exports, {
  30. conf: () => conf,
  31. language: () => language
  32. });
  33. var conf = {
  34. brackets: [
  35. ["{", "}"],
  36. ["[", "]"],
  37. ["(", ")"]
  38. ],
  39. autoClosingPairs: [
  40. { open: "{", close: "}" },
  41. { open: "[", close: "]" },
  42. { open: "(", close: ")" },
  43. { open: '"', close: '"' },
  44. { open: "'", close: "'" }
  45. ],
  46. surroundingPairs: [
  47. { open: "{", close: "}" },
  48. { open: "[", close: "]" },
  49. { open: "(", close: ")" },
  50. { open: '"', close: '"' },
  51. { open: "'", close: "'" }
  52. ]
  53. };
  54. var language = {
  55. defaultToken: "",
  56. tokenPostfix: ".redis",
  57. ignoreCase: true,
  58. brackets: [
  59. { open: "[", close: "]", token: "delimiter.square" },
  60. { open: "(", close: ")", token: "delimiter.parenthesis" }
  61. ],
  62. keywords: [
  63. "APPEND",
  64. "AUTH",
  65. "BGREWRITEAOF",
  66. "BGSAVE",
  67. "BITCOUNT",
  68. "BITFIELD",
  69. "BITOP",
  70. "BITPOS",
  71. "BLPOP",
  72. "BRPOP",
  73. "BRPOPLPUSH",
  74. "CLIENT",
  75. "KILL",
  76. "LIST",
  77. "GETNAME",
  78. "PAUSE",
  79. "REPLY",
  80. "SETNAME",
  81. "CLUSTER",
  82. "ADDSLOTS",
  83. "COUNT-FAILURE-REPORTS",
  84. "COUNTKEYSINSLOT",
  85. "DELSLOTS",
  86. "FAILOVER",
  87. "FORGET",
  88. "GETKEYSINSLOT",
  89. "INFO",
  90. "KEYSLOT",
  91. "MEET",
  92. "NODES",
  93. "REPLICATE",
  94. "RESET",
  95. "SAVECONFIG",
  96. "SET-CONFIG-EPOCH",
  97. "SETSLOT",
  98. "SLAVES",
  99. "SLOTS",
  100. "COMMAND",
  101. "COUNT",
  102. "GETKEYS",
  103. "CONFIG",
  104. "GET",
  105. "REWRITE",
  106. "SET",
  107. "RESETSTAT",
  108. "DBSIZE",
  109. "DEBUG",
  110. "OBJECT",
  111. "SEGFAULT",
  112. "DECR",
  113. "DECRBY",
  114. "DEL",
  115. "DISCARD",
  116. "DUMP",
  117. "ECHO",
  118. "EVAL",
  119. "EVALSHA",
  120. "EXEC",
  121. "EXISTS",
  122. "EXPIRE",
  123. "EXPIREAT",
  124. "FLUSHALL",
  125. "FLUSHDB",
  126. "GEOADD",
  127. "GEOHASH",
  128. "GEOPOS",
  129. "GEODIST",
  130. "GEORADIUS",
  131. "GEORADIUSBYMEMBER",
  132. "GETBIT",
  133. "GETRANGE",
  134. "GETSET",
  135. "HDEL",
  136. "HEXISTS",
  137. "HGET",
  138. "HGETALL",
  139. "HINCRBY",
  140. "HINCRBYFLOAT",
  141. "HKEYS",
  142. "HLEN",
  143. "HMGET",
  144. "HMSET",
  145. "HSET",
  146. "HSETNX",
  147. "HSTRLEN",
  148. "HVALS",
  149. "INCR",
  150. "INCRBY",
  151. "INCRBYFLOAT",
  152. "KEYS",
  153. "LASTSAVE",
  154. "LINDEX",
  155. "LINSERT",
  156. "LLEN",
  157. "LPOP",
  158. "LPUSH",
  159. "LPUSHX",
  160. "LRANGE",
  161. "LREM",
  162. "LSET",
  163. "LTRIM",
  164. "MGET",
  165. "MIGRATE",
  166. "MONITOR",
  167. "MOVE",
  168. "MSET",
  169. "MSETNX",
  170. "MULTI",
  171. "PERSIST",
  172. "PEXPIRE",
  173. "PEXPIREAT",
  174. "PFADD",
  175. "PFCOUNT",
  176. "PFMERGE",
  177. "PING",
  178. "PSETEX",
  179. "PSUBSCRIBE",
  180. "PUBSUB",
  181. "PTTL",
  182. "PUBLISH",
  183. "PUNSUBSCRIBE",
  184. "QUIT",
  185. "RANDOMKEY",
  186. "READONLY",
  187. "READWRITE",
  188. "RENAME",
  189. "RENAMENX",
  190. "RESTORE",
  191. "ROLE",
  192. "RPOP",
  193. "RPOPLPUSH",
  194. "RPUSH",
  195. "RPUSHX",
  196. "SADD",
  197. "SAVE",
  198. "SCARD",
  199. "SCRIPT",
  200. "FLUSH",
  201. "LOAD",
  202. "SDIFF",
  203. "SDIFFSTORE",
  204. "SELECT",
  205. "SETBIT",
  206. "SETEX",
  207. "SETNX",
  208. "SETRANGE",
  209. "SHUTDOWN",
  210. "SINTER",
  211. "SINTERSTORE",
  212. "SISMEMBER",
  213. "SLAVEOF",
  214. "SLOWLOG",
  215. "SMEMBERS",
  216. "SMOVE",
  217. "SORT",
  218. "SPOP",
  219. "SRANDMEMBER",
  220. "SREM",
  221. "STRLEN",
  222. "SUBSCRIBE",
  223. "SUNION",
  224. "SUNIONSTORE",
  225. "SWAPDB",
  226. "SYNC",
  227. "TIME",
  228. "TOUCH",
  229. "TTL",
  230. "TYPE",
  231. "UNSUBSCRIBE",
  232. "UNLINK",
  233. "UNWATCH",
  234. "WAIT",
  235. "WATCH",
  236. "ZADD",
  237. "ZCARD",
  238. "ZCOUNT",
  239. "ZINCRBY",
  240. "ZINTERSTORE",
  241. "ZLEXCOUNT",
  242. "ZRANGE",
  243. "ZRANGEBYLEX",
  244. "ZREVRANGEBYLEX",
  245. "ZRANGEBYSCORE",
  246. "ZRANK",
  247. "ZREM",
  248. "ZREMRANGEBYLEX",
  249. "ZREMRANGEBYRANK",
  250. "ZREMRANGEBYSCORE",
  251. "ZREVRANGE",
  252. "ZREVRANGEBYSCORE",
  253. "ZREVRANK",
  254. "ZSCORE",
  255. "ZUNIONSTORE",
  256. "SCAN",
  257. "SSCAN",
  258. "HSCAN",
  259. "ZSCAN"
  260. ],
  261. operators: [],
  262. builtinFunctions: [],
  263. builtinVariables: [],
  264. pseudoColumns: [],
  265. tokenizer: {
  266. root: [
  267. { include: "@whitespace" },
  268. { include: "@pseudoColumns" },
  269. { include: "@numbers" },
  270. { include: "@strings" },
  271. { include: "@scopes" },
  272. [/[;,.]/, "delimiter"],
  273. [/[()]/, "@brackets"],
  274. [
  275. /[\w@#$]+/,
  276. {
  277. cases: {
  278. "@keywords": "keyword",
  279. "@operators": "operator",
  280. "@builtinVariables": "predefined",
  281. "@builtinFunctions": "predefined",
  282. "@default": "identifier"
  283. }
  284. }
  285. ],
  286. [/[<>=!%&+\-*/|~^]/, "operator"]
  287. ],
  288. whitespace: [[/\s+/, "white"]],
  289. pseudoColumns: [
  290. [
  291. /[$][A-Za-z_][\w@#$]*/,
  292. {
  293. cases: {
  294. "@pseudoColumns": "predefined",
  295. "@default": "identifier"
  296. }
  297. }
  298. ]
  299. ],
  300. numbers: [
  301. [/0[xX][0-9a-fA-F]*/, "number"],
  302. [/[$][+-]*\d*(\.\d*)?/, "number"],
  303. [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, "number"]
  304. ],
  305. strings: [
  306. [/'/, { token: "string", next: "@string" }],
  307. [/"/, { token: "string.double", next: "@stringDouble" }]
  308. ],
  309. string: [
  310. [/[^']+/, "string"],
  311. [/''/, "string"],
  312. [/'/, { token: "string", next: "@pop" }]
  313. ],
  314. stringDouble: [
  315. [/[^"]+/, "string.double"],
  316. [/""/, "string.double"],
  317. [/"/, { token: "string.double", next: "@pop" }]
  318. ],
  319. scopes: []
  320. }
  321. };
  322. return __toCommonJS(redis_exports);
  323. })();
  324. return moduleExports;
  325. });