2020-09-13 21:34:12 +08:00
|
|
|
Prism.languages.molang = {
|
|
|
|
'string': /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
|
|
'function-name': /\b(?!\d)math\.\w+(?=[\t ]*\()/i,
|
2021-05-22 15:51:37 +08:00
|
|
|
'selector': /\b(?!\d)((query|variable|temp|context|math|q|v|t|c)\.\w+)|this/i,
|
2020-09-13 21:34:12 +08:00
|
|
|
'boolean': /\b(?:true|false)\b/i,
|
2022-12-31 08:28:49 +08:00
|
|
|
'number': /(?:\b\d+(?:\.\d+f?)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b/i,
|
2020-09-29 23:14:26 +08:00
|
|
|
'operator': /&&|\|\||[-+*/!<>]=?|[:?=]/i,
|
2022-12-30 08:13:42 +08:00
|
|
|
'keyword': /\b(return|loop|for_each|break|continue)\b/i,
|
2020-09-13 21:34:12 +08:00
|
|
|
'punctuation': /[.,;()[\]{}]/,
|
|
|
|
};
|