blockbench/lib/molang-prism-syntax.js
JannisX11 2bc836d72c Fix issue with NaNs when offsetting keyframes
Improve molang syntax highlighting
Prevent animations from being imported twice
Set default cancel button in MessageBox to last button
2020-09-29 17:14:26 +02:00

11 lines
418 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|math)\.\w+/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': /[.,;()[\]{}]/,
};