refractor
Version:
Lightweight, robust, elegant virtual syntax highlighting using Prism
14 lines (13 loc) • 827 B
JavaScript
'use strict';
var c = require('./c.js');
module.exports = objectivec;
objectivec.displayName = 'objectivec';
objectivec.aliases = [];
function objectivec(Prism) {
Prism.register(c);
Prism.languages.objectivec = Prism.languages.extend('c', {
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|in|self|super)\b|(?: | | | | | | | | | | | | | | | )\b/,
string: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
});
}