blob: 4e5048de8e4057eeb7d579a4e66c20aaf3bc53c9 [file] [log] [blame]
{"version":3,"sources":["webpack:///./node_modules/react-syntax-highlighter/node_modules/highlight.js/lib/languages/r.js"],"names":["module","exports","hljs","IDENT_RE","name","keywords","$pattern","keyword","literal","built_in","contains","COMMENT","className","begin","starts","endsParent","end","excludeBegin","variants","HASH_COMMENT_MODE","BACKSLASH_ESCAPE","END_SAME_AS_BEGIN","relevance"],"mappings":"8EAmJAA,EAAOC,QA3IP,SAAWC,GAOT,IAAIC,EAAW,uDACf,MAAO,CACLC,KAAM,IACNC,SAAU,CACRC,SAAUH,EACVI,QAAS,kDACTC,QAAS,wFACTC,SACA,kgCAKFC,SAAU,CACVR,EAAKS,QAAQ,KAAM,IAAK,CACtBD,SAAU,CAAC,CAMTE,UAAW,SACXC,MAAO,YACPC,OAAQ,CACNJ,SAAU,CAAC,CACTG,MAAO,MACN,CACDA,MAAO,sBACPE,YAAY,GACX,CACDF,MAAO,KACPG,IAAK,IACLC,cAAc,MAGjB,CAGDL,UAAW,SACXC,MAAO,SACPG,IAAK,IACLN,SAAU,CAAC,CACTE,UAAW,WACXM,SAAU,CAAC,CACTL,MAAOV,GACN,CACDU,MAAO,oBAETE,YAAY,KAEb,CACDH,UAAW,SACXC,MAAO,cACN,CACDD,UAAW,eACXC,MAAO,kBAEPX,EAAKiB,kBAAmB,CAC1BP,UAAW,SACXF,SAAU,CAACR,EAAKkB,kBAChBF,SAAU,CAAChB,EAAKmB,kBAAkB,CAChCR,MAAO,cACPG,IAAK,YACHd,EAAKmB,kBAAkB,CACzBR,MAAO,cACPG,IAAK,YACHd,EAAKmB,kBAAkB,CACzBR,MAAO,cACPG,IAAK,YACHd,EAAKmB,kBAAkB,CACzBR,MAAO,cACPG,IAAK,YACHd,EAAKmB,kBAAkB,CACzBR,MAAO,cACPG,IAAK,YACHd,EAAKmB,kBAAkB,CACzBR,MAAO,cACPG,IAAK,YACH,CACFH,MAAO,IACPG,IAAK,IACLM,UAAW,GACV,CACDT,MAAO,IACPG,IAAK,IACLM,UAAW,KAEZ,CACDV,UAAW,SACXM,SAAU,CAOV,CAEEL,MAAO,oEACPG,IAAK,gDACLC,cAAc,GACb,CACDJ,MAAO,4DACPG,IAAK,wCACLC,cAAc,GACb,CACDJ,MAAO,8DACPG,IAAK,0CACLC,cAAc,IAQhBK,UAAW,GACV,CAEDT,MAAO,IACPG,IAAK,KACJ,CAEDH,MAAO,IACPG,IAAK,IACLN,SAAU,CAAC,CACTG,MAAO","file":"react-syntax-highlighter_languages_highlight_r-cf1bd2267c41f21eb082.js","sourcesContent":["/*\nLanguage: R\nDescription: R is a free software environment for statistical computing and graphics.\nAuthor: Joe Cheng <joe@rstudio.org>\nContributors: Konrad Rudolph <konrad.rudolph@gmail.com>\nWebsite: https://www.r-project.org\nCategory: scientific\n*/\nfunction r(hljs) {\n // Identifiers in R cannot start with `_`, but they can start with `.` if it\n // is not immediately followed by a digit.\n // R also supports quoted identifiers, which are near-arbitrary sequences\n // delimited by backticks (`…`), which may contain escape sequences. These are\n // handled in a separate mode. See `test/markup/r/names.txt` for examples.\n // FIXME: Support Unicode identifiers.\n var IDENT_RE = /(?:(?:[a-zA-Z]|\\.[._a-zA-Z])[._a-zA-Z0-9]*)|\\.(?!\\d)/;\n return {\n name: 'R',\n keywords: {\n $pattern: IDENT_RE,\n keyword: 'function if in break next repeat else for while',\n literal: 'NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 ' + 'NA_character_|10 NA_complex_|10',\n built_in: // Builtin constants\n 'LETTERS letters month.abb month.name pi T F ' + // Primitive functions\n // These are all the functions in `base` that are implemented as a\n // `.Primitive`, minus those functions that are also keywords.\n 'abs acos acosh all any anyNA Arg as.call as.character' + 'as.complex as.double as.environment as.integer as.logical' + 'as.null.default as.numeric as.raw asin asinh atan atanh attr' + 'attributes baseenv browser c call ceiling class Conj cos cosh' + 'cospi cummax cummin cumprod cumsum digamma dim dimnames' + 'emptyenv exp expression floor forceAndCall gamma gc.time' + 'globalenv Im interactive invisible is.array is.atomic is.call' + 'is.character is.complex is.double is.environment is.expression' + 'is.finite is.function is.infinite is.integer is.language' + 'is.list is.logical is.matrix is.na is.name is.nan is.null' + 'is.numeric is.object is.pairlist is.raw is.recursive is.single' + 'is.symbol lazyLoadDBfetch length lgamma list log max min' + 'missing Mod names nargs nzchar oldClass on.exit pos.to.env' + 'proc.time prod quote range Re rep retracemem return round' + 'seq_along seq_len seq.int sign signif sin sinh sinpi sqrt' + 'standardGeneric substitute sum switch tan tanh tanpi tracemem' + 'trigamma trunc unclass untracemem UseMethod xtfrm'\n },\n contains: [// Roxygen comments\n hljs.COMMENT(/#'/, /$/, {\n contains: [{\n // Handle `@examples` separately to cause all subsequent code\n // until the next `@`-tag on its own line to be kept as-is,\n // preventing highlighting. This code is example R code, so nested\n // doctags shouldn’t be treated as such. See\n // `test/markup/r/roxygen.txt` for an example.\n className: 'doctag',\n begin: '@examples',\n starts: {\n contains: [{\n begin: /\\n/\n }, {\n begin: /#'\\s*(?=@[a-zA-Z]+)/,\n endsParent: true\n }, {\n begin: /#'/,\n end: /$/,\n excludeBegin: true\n }]\n }\n }, {\n // Handle `@param` to highlight the parameter name following\n // after.\n className: 'doctag',\n begin: '@param',\n end: /$/,\n contains: [{\n className: 'variable',\n variants: [{\n begin: IDENT_RE\n }, {\n begin: /`(?:\\\\.|[^`])+`/\n }],\n endsParent: true\n }]\n }, {\n className: 'doctag',\n begin: /@[a-zA-Z]+/\n }, {\n className: 'meta-keyword',\n begin: /\\\\[a-zA-Z]+/\n }]\n }), hljs.HASH_COMMENT_MODE, {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE],\n variants: [hljs.END_SAME_AS_BEGIN({\n begin: /[rR]\"(-*)\\(/,\n end: /\\)(-*)\"/\n }), hljs.END_SAME_AS_BEGIN({\n begin: /[rR]\"(-*)\\{/,\n end: /\\}(-*)\"/\n }), hljs.END_SAME_AS_BEGIN({\n begin: /[rR]\"(-*)\\[/,\n end: /\\](-*)\"/\n }), hljs.END_SAME_AS_BEGIN({\n begin: /[rR]'(-*)\\(/,\n end: /\\)(-*)'/\n }), hljs.END_SAME_AS_BEGIN({\n begin: /[rR]'(-*)\\{/,\n end: /\\}(-*)'/\n }), hljs.END_SAME_AS_BEGIN({\n begin: /[rR]'(-*)\\[/,\n end: /\\](-*)'/\n }), {\n begin: '\"',\n end: '\"',\n relevance: 0\n }, {\n begin: \"'\",\n end: \"'\",\n relevance: 0\n }]\n }, {\n className: 'number',\n variants: [// TODO: replace with negative look-behind when available\n // { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\\.[0-9a-fA-F]*[pP][+-]?\\d+i?/ },\n // { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\\d+)?[Li]?/ },\n // { begin: /(?<![a-zA-Z0-9._])(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?[Li]?/ }\n // The below rules all eat an extra character in front (for the\n // look-behind check) and then exclude it from the match, but I think\n // in many cases this will work out just fine.\n {\n // Special case: only hexadecimal binary powers can contain fractions.\n begin: /([^a-zA-Z0-9._])(?=0[xX][0-9a-fA-F]+\\.[0-9a-fA-F]*[pP][+-]?\\d+i?)/,\n end: /0[xX][0-9a-fA-F]+\\.[0-9a-fA-F]*[pP][+-]?\\d+i?/,\n excludeBegin: true\n }, {\n begin: /([^a-zA-Z0-9._])(?=0[xX][0-9a-fA-F]+([pP][+-]?\\d+)?[Li]?)/,\n end: /0[xX][0-9a-fA-F]+([pP][+-]?\\d+)?[Li]?/,\n excludeBegin: true\n }, {\n begin: /([^a-zA-Z0-9._])(?=(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?[Li]?)/,\n end: /(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?[Li]?/,\n excludeBegin: true\n }],\n // \"on:begin\": (match, response) => {\n // if (match.index > 0) {\n // let priorChar = match.input[match.index - 1];\n // if (priorChar.match(/[a-zA-Z0-9._]/)) response.ignoreMatch();\n // }\n // },\n relevance: 0\n }, {\n // infix operator\n begin: '%',\n end: '%'\n }, {\n // escaped identifier\n begin: '`',\n end: '`',\n contains: [{\n begin: /\\\\./\n }]\n }]\n };\n}\n\nmodule.exports = r;"],"sourceRoot":""}