6 lines
7.3 KiB
JavaScript
6 lines
7.3 KiB
JavaScript
|
|
const lang = Object.freeze(JSON.parse("{\"displayName\":\"R\",\"fileTypes\":[\"R\",\"r\",\"Rprofile\"],\"foldingStartMarker\":\"\\\\{\\\\s*(?:#|$)\",\"foldingStopMarker\":\"^\\\\s*}\",\"name\":\"r\",\"patterns\":[{\"include\":\"#roxygen-example\"},{\"include\":\"#basic\"}],\"repository\":{\"basic\":{\"patterns\":[{\"include\":\"#roxygen\"},{\"include\":\"#comment\"},{\"include\":\"#expression\"}]},\"basic-roxygen-example\":{\"patterns\":[{\"match\":\"^\\\\s*#+'\",\"name\":\"comment.line\"},{\"include\":\"#comment\"},{\"include\":\"#expression\"}]},\"brackets\":{\"patterns\":[{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"meta.bracket\",\"patterns\":[{\"include\":\"#basic\"}]},{\"begin\":\"\\\\[\",\"end\":\"]\",\"name\":\"meta.bracket\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"variable.parameter\"}},\"match\":\"([.\\\\w]+)\\\\s*(?==[^=])\"},{\"include\":\"#basic\"}]},{\"begin\":\"\\\\(\",\"end\":\"\\\\)\",\"name\":\"meta.bracket\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"variable.parameter\"}},\"match\":\"([.\\\\w]+)\\\\s*(?==[^=])\"},{\"include\":\"#basic\"}]}]},\"comment\":{\"match\":\"#.*\",\"name\":\"comment.line\"},\"escape-code\":{\"match\":\"\\\\\\\\[\\\"'\\\\\\\\`abefnrtv]\",\"name\":\"constant.character.escape\"},\"escape-hex\":{\"match\":\"\\\\\\\\x\\\\h+\",\"name\":\"constant.numeric\"},\"escape-invalid\":{\"match\":\"\\\\\\\\.\",\"name\":\"invalid\"},\"escape-octal\":{\"match\":\"\\\\\\\\\\\\d{1,3}\",\"name\":\"constant.character.escape\"},\"escape-unicode\":{\"match\":\"\\\\\\\\[Uu](?:\\\\h+|\\\\{\\\\h+})\",\"name\":\"constant.character.escape\"},\"escapes\":{\"patterns\":[{\"include\":\"#escape-code\"},{\"include\":\"#escape-hex\"},{\"include\":\"#escape-octal\"},{\"include\":\"#escape-unicode\"},{\"include\":\"#escape-invalid\"}]},\"expression\":{\"patterns\":[{\"include\":\"#brackets\"},{\"include\":\"#raw-strings\"},{\"include\":\"#strings\"},{\"include\":\"#function-definition\"},{\"include\":\"#keywords\"},{\"include\":\"#function-call\"},{\"include\":\"#identifiers\"},{\"include\":\"#numbers\"},{\"include\":\"#operators\"}]},\"function-call\":{\"captures\":{\"0\":{\"name\":\"meta.function-call\"},\"1\":{\"name\":\"entity.name.function\"}},\"match\":\"([.\\\\w]+)(?=\\\\()\"},\"function-definition\":{\"begin\":\"(function)\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other\"},\"2\":{\"name\":\"meta.bracket\"}},\"end\":\"(\\\\))\",\"endCaptures\":{\"1\":{\"name\":\"meta.bracket\"}},\"name\":\"meta.function.definition\",\"patterns\":[{\"begin\":\"([.\\\\w]+)\",\"beginCaptures\":{\"1\":{\"name\":\"variable.parameter\"}},\"end\":\"(?=[),])\",\"patterns\":[{\"include\":\"#basic\"}]},{\"include\":\"#basic\"}]},\"identifier-quoted\":{\"begin\":\"`\",\"end\":\"`\",\"name\":\"variable.object\",\"patterns\":[{\"match\":\"\\\\\\\\`\"}]},\"identifier-syntactic\":{\"match\":\"[.\\\\p{L}\\\\p{Nl}][.\\\\p{L}\\\\p{Nl}\\\\p{Mn}\\\\p{Mc}\\\\d\\\\p{Pc}]*\",\"name\":\"variable.object\"},\"identifiers\":{\"patterns\":[{\"include\":\"#identifier-syntactic\"},{\"include\":\"#identifier-quoted\"}]},\"keywords\":{\"patterns\":[{\"include\":\"#keywords-control\"},{\"include\":\"#keywords-builtin\"},{\"include\":\"#keywords-constant\"}]},\"keywords-builtin\":{\"match\":\"(?:setGroupGeneric|setRefClass|setGeneric|NextMethod|setMethod|UseMethod|tryCatch|setClass|warning|require|library|R6Class|return|switch|attach|detach|source|stop|try)(?=\\\\()\",\"name\":\"keyword.other\"},\"keywords-constant\":{\"match\":\"(?:NA_character_|NA_integer_|NA_complex_|NA_real_|TRUE|FALSE|NULL|Inf|NaN|NA)\\\\b\",\"name\":\"constant.language\"},\"keywords-control\":{\"match\":\"(?:\\\\\\\\|function|if|else|in|break|next|repeat|for|while)\\\\b\",\"name\":\"keyword\"},\"latex\":{\"patterns\":[{\"match\":\"\\\\\\\\\\\\w+\",\"name\":\"keyword.other\"}]},\"markdown\":{\"patterns\":[{\"begin\":\"(`{3,})\\\\s*(.*)\",\"beginCaptures\":{\"1\":{\"name\":\"comment.line\"},\"2\":{\"name\":\"entity.name.section\"}},\"end\":\"(\\\\1)\",\"endCaptures\":{\"1\":{\"name\":\"comment.line\"}},\"patterns\":[{\"match\":\"^\\\\s*#+'\",\"name\":\"co
|
||
|
|
|
||
|
|
export default [
|
||
|
|
lang
|
||
|
|
]
|