blockbench/lib/molang-prism-syntax.js
JannisX11 881c0559fd Add support for "this" in molang expressions
Bump version to 3.9
Change text color of recent project date
2021-05-22 09:51:37 +02:00

11 lines
441 B
JavaScript

Prism.languages.molang = {
'string': /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
'function-name': /\b(?!\d)math\.\w+(?=[\t ]*\()/i,
'selector': /\b(?!\d)((query|variable|temp|context|math|q|v|t|c)\.\w+)|this/i,
'boolean': /\b(?:true|false)\b/i,
'number': /(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,
'operator': /&&|\|\||[-+*/!<>]=?|[:?=]/i,
'keyword': /\b(Return)\b/i,
'punctuation': /[.,;()[\]{}]/,
};