1 | Prism.languages.r = {
|
2 | 'comment': /#.+/,
|
3 | 'string': /(['"])(?:\\?.)*?\1/,
|
4 | 'percent-operator': {
|
5 |
|
6 |
|
7 | pattern: /%[^%]*?%/,
|
8 | alias: 'operator'
|
9 | },
|
10 | 'boolean': /\b(?:TRUE|FALSE)\b/,
|
11 | 'ellipsis': /\.\.(?:\.|\d+)/,
|
12 | 'number': [
|
13 | /\b(?:NaN|Inf)\b/,
|
14 | /\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]??\d+)?[iL]?\b/
|
15 | ],
|
16 | 'keyword': /\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,
|
17 | 'operator': /->>?|<?<-|[<>!=]=?|::?|&&?|\|\|?|[+\-*\/^$@~]/,
|
18 | 'punctuation': /[(){}\[\],;]/
|
19 | }; |
\ | No newline at end of file |