mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
14 lines
577 B
JavaScript
14 lines
577 B
JavaScript
Prism.languages.matlab = {
|
|
// We put string before comment, because of printf() patterns that contain "%"
|
|
'string': /\B'(?:''|[^'\n])*'/,
|
|
'comment': [
|
|
/%\{[\s\S]*?\}%/,
|
|
/%.+/
|
|
],
|
|
// FIXME We could handle imaginary numbers as a whole
|
|
'number': /\b-?(?:\d*\.?\d+(?:[eE][+-]?\d+)?(?:[ij])?|[ij])\b/,
|
|
'keyword': /\b(?:break|case|catch|continue|else|elseif|end|for|function|if|inf|NaN|otherwise|parfor|pause|pi|return|switch|try|while)\b/,
|
|
'function': /(?!\d)\w+(?=\s*\()/,
|
|
'operator': /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,
|
|
'punctuation': /\.{3}|[.,;\[\](){}!]/
|
|
}; |