1
0
mirror of https://github.com/arsenetar/PrismHighlight.git synced 2024-11-23 20:39:01 +00:00
PrismHighlight/prism/components/prism-c.js
Andrew Senetar 7e04feff9f First Version ( v0.1 )
First Version of the PrismHighlight Mediawiki extension.
2013-06-07 01:49:35 -04:00

10 lines
527 B
JavaScript

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/g,
'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|={1,2}|\^|~|%|(&){1,2}|\|?\||\?|\*|\//g
});
Prism.languages.insertBefore('c', 'keyword', {
//property class reused for macro statements
'property': /#\s*[a-zA-Z]+/g
});