You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
802 B
JavaScript

Prism.languages.rip = {
'comment': /#[^\r\n]*(\r?\n|$)/g,
'keyword': /(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/g,
'builtin': /\b(@|System)\b/g,
'boolean': /\b(true|false)\b/g,
'date': /\b\d{4}-\d{2}-\d{2}\b/g,
'time': /\b\d{2}:\d{2}:\d{2}\b/g,
'datetime': /\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/g,
'number': /[+-]?(?:(?:\d+\.\d+)|(?:\d+))/g,
'character': /\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/g,
'regex': {
pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/(?=\s*($|[\r\n,.;})]))/g,
lookbehind: true
},
'symbol': /:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/g,
'string': /("|')(\\?.)*?\1/g,
'punctuation': /(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,
'reference': /[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/g
};