Urara-Blog/node_modules/.pnpm-store/v3/files/91/dd1c5c477e1ac0da319c41fd53ad07cb8b58825d1204789b3d09c402758aeaef390ec11df12b10ccfedabceed23cb2aef5c3fd2cd0239d450f972bd76caa32
2022-08-14 01:14:53 +08:00

22 lines
678 B
Text

Prism.languages.r = {
'comment': /#.*/,
'string': {
pattern: /(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'percent-operator': {
// Includes user-defined operators
// and %%, %*%, %/%, %in%, %o%, %x%
pattern: /%[^%\s]*%/,
alias: 'operator'
},
'boolean': /\b(?:FALSE|TRUE)\b/,
'ellipsis': /\.\.(?:\.|\d+)/,
'number': [
/\b(?:Inf|NaN)\b/,
/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/
],
'keyword': /\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,
'operator': /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,
'punctuation': /[(){}\[\],;]/
};