main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
678 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | Prism.languages.r = {
|
---|
| 2 | 'comment': /#.*/,
|
---|
| 3 | 'string': {
|
---|
| 4 | pattern: /(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
---|
| 5 | greedy: true
|
---|
| 6 | },
|
---|
| 7 | 'percent-operator': {
|
---|
| 8 | // Includes user-defined operators
|
---|
| 9 | // and %%, %*%, %/%, %in%, %o%, %x%
|
---|
| 10 | pattern: /%[^%\s]*%/,
|
---|
| 11 | alias: 'operator'
|
---|
| 12 | },
|
---|
| 13 | 'boolean': /\b(?:FALSE|TRUE)\b/,
|
---|
| 14 | 'ellipsis': /\.\.(?:\.|\d+)/,
|
---|
| 15 | 'number': [
|
---|
| 16 | /\b(?:Inf|NaN)\b/,
|
---|
| 17 | /(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/
|
---|
| 18 | ],
|
---|
| 19 | 'keyword': /\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,
|
---|
| 20 | 'operator': /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,
|
---|
| 21 | 'punctuation': /[(){}\[\],;]/
|
---|
| 22 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.