Blame view

bower_components/prism/components/prism-matlab.js 577 Bytes
73bcce88   luigser   COMPONENTS
1
2
  Prism.languages.matlab = {
  	// We put string before comment, because of printf() patterns that contain "%"
eb240478   Luigi Serra   public room cards...
3
  	'string': /\B'(?:''|[^'\n])*'/,
73bcce88   luigser   COMPONENTS
4
5
6
7
8
9
10
11
12
13
14
  	'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}|[.,;\[\](){}!]/
  };