Blame view

bower_components/prism/components/prism-c.js 953 Bytes
73bcce88   luigser   COMPONENTS
1
2
  Prism.languages.c = Prism.languages.extend('clike', {
  	'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
eb240478   Luigi Serra   public room cards...
3
4
  	'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
  	'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
73bcce88   luigser   COMPONENTS
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  });
  
  Prism.languages.insertBefore('c', 'string', {
  	'macro': {
  		// allow for multiline macro definitions
  		// spaces after the # character compile fine with gcc
  		pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
  		lookbehind: true,
  		alias: 'property',
  		inside: {
  			// highlight the path of the include statement as a string
  			'string': {
  				pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
  				lookbehind: true
  			}
  		}
  	}
  });
  
  delete Prism.languages.c['class-name'];
eb240478   Luigi Serra   public room cards...
25
  delete Prism.languages.c['boolean'];