/usr/lib/nodejs/highlight/r.js is in node-highlight 7.4+ds-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | module.exports = function(hljs) {
var IDENT_RE = '([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*';
return {
contains: [
hljs.HASH_COMMENT_MODE,
{
begin: IDENT_RE,
lexems: IDENT_RE,
keywords: {
keyword:
'function if in break next repeat else for return switch while try tryCatch|10 ' +
'stop warning require library attach detach source setMethod setGeneric ' +
'setGroupGeneric setClass ...|10',
literal:
'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' +
'NA_complex_|10'
},
relevance: 0
},
{
// hex value
className: 'number',
begin: "0[xX][0-9a-fA-F]+[Li]?\\b",
relevance: 0
},
{
// explicit integer
className: 'number',
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b",
relevance: 0
},
{
// number with trailing decimal
className: 'number',
begin: "\\d+\\.(?!\\d)(?:i\\b)?",
relevance: 0
},
{
// number
className: 'number',
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// number with leading decimal
className: 'number',
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// escaped identifier
begin: '`',
end: '`',
relevance: 0
},
{
className: 'string',
begin: '"',
end: '"',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
},
{
className: 'string',
begin: "'",
end: "'",
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
}
]
};
};
|