diff --git a/extensions/ruby/cgmanifest.json b/extensions/ruby/cgmanifest.json index 2cd9595e4e5..49719a8afe9 100644 --- a/extensions/ruby/cgmanifest.json +++ b/extensions/ruby/cgmanifest.json @@ -4,27 +4,56 @@ "component": { "type": "git", "git": { - "name": "textmate/ruby.tmbundle", - "repositoryUrl": "https://github.com/textmate/ruby.tmbundle", - "commitHash": "efcb8941c701343f1b2e9fb105c678152fea6892" + "name": "Shopify/ruby-lsp", + "repositoryUrl": "https://github.com/Shopify/ruby-lsp", + "commitHash": "01a8ecf608b7d8607adcd89c32db72ae3852f33b" } }, "licenseDetail": [ - "Copyright (c) textmate-ruby.tmbundle project authors", + "The MIT License (MIT)", "", - "If not otherwise specified (see below), files in this folder fall under the following license: ", + "Copyright (c) 2022-present, Shopify Inc.", "", - "Permission to copy, use, modify, sell and distribute this", - "software is granted. This software is provided \"as is\" without", - "express or implied warranty, and with no claim as to its", - "suitability for any purpose.", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", "", - "An exception is made for files in readable text which contain their own license information, ", - "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added ", - "to the base-name name of the original file, and an extension of txt, html, or similar. For example ", - "\"tidy\" is accompanied by \"tidy-license.txt\"." + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN", + "THE SOFTWARE.", + "", + "================================================================================", + "The following files and related configuration in package.json are based on a", + "sequence of adaptions: grammars/ruby.cson.json, grammars/erb.cson.json,", + "languages/erb.json.", + "", + "Copyright (c) 2016 Peng Lv", + "Copyright (c) 2017-2019 Stafford Brunk", + "https://github.com/rubyide/vscode-ruby", + "", + " Released under the MIT license", + " https://github.com/rubyide/vscode-ruby/blob/main/LICENSE.txt", + "", + "Copyright (c) 2014 GitHub Inc.", + "https://github.com/atom/language-ruby", + "", + " Released under the MIT license", + " https://github.com/atom/language-ruby/blob/master/LICENSE.md", + "", + "https://github.com/textmate/ruby.tmbundle", + " https://github.com/textmate/ruby.tmbundle#license" ], - "license": "TextMate Bundle License", + "license": "MIT License", "version": "0.0.0" } ], diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index 8210a7825af..8dc105b3481 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin Shopify/ruby-lsp vscode/grammars/ruby.cson.json ./syntaxes/ruby.tmLanguage.json" }, "categories": ["Programming Languages"], "contributes": { diff --git a/extensions/ruby/syntaxes/ruby.tmLanguage.json b/extensions/ruby/syntaxes/ruby.tmLanguage.json index 84d619cc51a..84fb37228e6 100644 --- a/extensions/ruby/syntaxes/ruby.tmLanguage.json +++ b/extensions/ruby/syntaxes/ruby.tmLanguage.json @@ -1,13 +1,12 @@ { "information_for_contributors": [ - "This file has been converted from https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist", + "This file has been converted from https://github.com/Shopify/ruby-lsp/blob/master/vscode/grammars/ruby.cson.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/textmate/ruby.tmbundle/commit/efcb8941c701343f1b2e9fb105c678152fea6892", + "version": "https://github.com/Shopify/ruby-lsp/commit/01a8ecf608b7d8607adcd89c32db72ae3852f33b", "name": "Ruby", "scopeName": "source.ruby", - "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <>)=)", + "comment": "A local variable operation assignment (+=, -=, *=, /=)" + }, + { + "captures": { + "1": { + "name": "keyword.control.ruby" + }, + "3": { + "name": "variable.ruby" + }, + "5": { + "name": "keyword.operator.assignment.augmented.ruby" + } + }, + "match": "(?>)=)", + "comment": "A local variable operation assignment in a condition" + }, + { + "captures": { + "1": { + "name": "variable.ruby" + } + }, + "match": "^\\s*([a-z]([A-Za-z0-9_])*)\\s*=[^=>]", + "comment": "A local variable assignment" + }, + { + "captures": { + "1": { + "name": "keyword.control.ruby" + }, + "3": { + "name": "variable.ruby" + } + }, + "match": "(?]", + "comment": "A local variable assignment in a condition" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.hashkey.ruby" } }, "comment": "symbols as hash key (1.9 syntax)", "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", - "name": "constant.other.symbol.hashkey.ruby" + "name": "constant.language.symbol.hashkey.ruby" }, { "captures": { @@ -86,7 +158,7 @@ }, "comment": "symbols as hash key (1.8 syntax)", "match": "(?[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)", - "name": "constant.other.symbol.hashkey.ruby" + "name": "constant.language.symbol.hashkey.ruby" }, { "comment": "everything being a reserved word, not a value and needing a 'end' is a..", @@ -100,61 +172,42 @@ }, { "comment": "contextual smart pair support", - "match": "(?<=\\{)(\\s+)", + "match": "(?<={)(\\s+)", "name": "meta.syntax.ruby.start-block" }, { - "match": "(?|_|\\*|\\$|\\?|:|\"|-[0adFiIlpvw])", + "match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])", "name": "variable.other.readwrite.global.pre-defined.ruby" }, { @@ -205,7 +258,7 @@ "name": "variable.other.constant.ruby" } }, - "end": "\\]", + "end": "]", "name": "meta.environment-variable.ruby", "patterns": [ { @@ -218,15 +271,39 @@ "name": "support.class.ruby" }, { - "match": "\\b(abort|at_exit|autoload[?]?|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)(\\b|(?<=[?!]))(?![?!])", + "match": "\\b((abort|at_exit|autoload|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\b(?![?!])|autoload\\?|exit!)", "name": "support.function.kernel.ruby" }, { - "match": "\\b[A-Z]\\w*\\b", + "match": "\\b[_A-Z]\\w*\\b", "name": "variable.other.constant.ruby" }, { - "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ", + "begin": "(->)\\(", + "beginCaptures": { + "1": { + "name": "support.function.kernel.ruby" + } + }, + "comment": "Lambda parameters.", + "end": "\\)", + "patterns": [ + { + "begin": "(?=[&*_a-zA-Z])", + "end": "(?=[,)])", + "patterns": [ + { + "include": "#method_parameters" + } + ] + }, + { + "include": "#method_parameters" + } + ] + }, + { + "begin": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\s+\n(\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n ===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n )\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.def.ruby" @@ -238,7 +315,7 @@ "name": "punctuation.definition.parameters.ruby" } }, - "comment": "the method pattern comes from the symbol pattern, see there for a explaination", + "comment": "The method pattern comes from the symbol pattern. See there for an explanation.", "end": "\\)", "endCaptures": { "0": { @@ -252,89 +329,17 @@ "end": "(?=[,)])", "patterns": [ { - "captures": { - "1": { - "name": "storage.type.variable.ruby" - }, - "2": { - "name": "constant.other.symbol.hashkey.parameter.function.ruby" - }, - "3": { - "name": "punctuation.definition.constant.ruby" - }, - "4": { - "name": "variable.parameter.function.ruby" - } - }, - "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" - }, - { - "include": "#parens" - }, - { - "include": "#braces" - }, - { - "include": "$self" - } - ] - } - ], - "repository": { - "braces": { - "begin": "\\{", - "beginCaptures": { - "0": { - "name": "punctuation.section.function.begin.ruby" - } - }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.section.function.end.ruby" - } - }, - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#braces" - }, - { - "include": "$self" + "include": "#method_parameters" } ] }, - "parens": { - "begin": "\\(", - "beginCaptures": { - "0": { - "name": "punctuation.section.function.begin.ruby" - } - }, - "end": "\\)", - "endCaptures": { - "0": { - "name": "punctuation.section.function.end.ruby" - } - }, - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#braces" - }, - { - "include": "$self" - } - ] + { + "include": "#method_parameters" } - } + ] }, { - "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", + "begin": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\s+\n(\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n ===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n )\n)\n[ \\t]\n(?=[ \\t]*[^\\s#;]) # make sure the following is not comment", "beginCaptures": { "1": { "name": "keyword.control.def.ruby" @@ -344,35 +349,20 @@ } }, "comment": "same as the previous rule, but without parentheses around the arguments", - "end": "$", + "end": "(?=;)|(?<=[\\w\\])}`'\"!?])(?=\\s*#|\\s*$)", "name": "meta.function.method.with-arguments.ruby", "patterns": [ { - "begin": "(?![\\s,])", - "end": "(?=,|$)", + "begin": "(?=[&*_a-zA-Z])", + "end": "(?=,|;|\\s*#|\\s*$)", "patterns": [ { - "captures": { - "1": { - "name": "storage.type.variable.ruby" - }, - "2": { - "name": "constant.other.symbol.hashkey.parameter.function.ruby" - }, - "3": { - "name": "punctuation.definition.constant.ruby" - }, - "4": { - "name": "variable.parameter.function.ruby" - } - }, - "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))", - "name": "variable.parameter.function.ruby" - }, - { - "include": "$self" + "include": "#method_parameters" } ] + }, + { + "include": "#method_parameters" } ] }, @@ -386,38 +376,28 @@ } }, "comment": " the optional name is just to catch the def also without a method-name", - "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ", + "match": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\b\n(\n \\s+\n (\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n ===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n )\n )\n)?", "name": "meta.function.method.without-arguments.ruby" }, { - "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b", - "name": "constant.numeric.float.ruby" - }, - { - "match": "\\b(0|(0[dD]\\d|[1-9])(?>_?\\d)*)r?i?\\b", - "name": "constant.numeric.integer.ruby" - }, - { - "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b", - "name": "constant.numeric.hex.ruby" - }, - { - "match": "\\b0[bB][01](?>_?[01])*r?i?\\b", - "name": "constant.numeric.binary.ruby" - }, - { - "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b", - "name": "constant.numeric.octal.ruby" + "match": "(?x)\n\\b\n(\n [\\d](?>_?\\d)* # 100_000\n (\\.(?![^[:space:][:digit:]])(?>_?\\d)*)? # fractional part\n ([eE][-+]?\\d(?>_?\\d)*)? # 1.23e-4\n |\n 0\n (?:\n [xX]\\h(?>_?\\h)*|\n [oO]?[0-7](?>_?[0-7])*|\n [bB][01](?>_?[01])*|\n [dD]\\d(?>_?\\d)*\n ) # A base indicator can only be used with an integer\n)\\b", + "name": "constant.numeric.ruby" }, { "begin": ":'", - "captures": { + "beginCaptures": { "0": { - "name": "punctuation.definition.constant.ruby" + "name": "punctuation.definition.symbol.begin.ruby" } }, + "comment": "symbol literal with '' delimiter", "end": "'", - "name": "constant.other.symbol.single-quoted.ruby", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", "patterns": [ { "match": "\\\\['\\\\]", @@ -427,13 +407,19 @@ }, { "begin": ":\"", - "captures": { + "beginCaptures": { "0": { - "name": "punctuation.definition.constant.ruby" + "name": "punctuation.section.symbol.begin.ruby" } }, + "comment": "symbol literal with \"\" delimiter", "end": "\"", - "name": "constant.other.symbol.double-quoted.ruby", + "endCaptures": { + "0": { + "name": "punctuation.section.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.interpolated.ruby", "patterns": [ { "include": "#interpolated_ruby" @@ -455,7 +441,7 @@ "name": "punctuation.definition.string.begin.ruby" } }, - "comment": "single quoted string (does not allow interpolation)", + "comment": "string literal with '' delimiter", "end": "'", "endCaptures": { "0": { @@ -477,14 +463,14 @@ "name": "punctuation.definition.string.begin.ruby" } }, - "comment": "double quoted string (allows for interpolation)", + "comment": "string literal with interpolation and \"\" delimiter", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, - "name": "string.quoted.double.ruby", + "name": "string.quoted.double.interpolated.ruby", "patterns": [ { "include": "#interpolated_ruby" @@ -495,7 +481,7 @@ ] }, { - "begin": "`", + "begin": "(?~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t", + "begin": "(?x)\n(?|=>|==|=~|!~|!=|;|$|\n if|else|elsif|then|do|end|unless|while|until|or|and\n )\n |\n $\n)", "captures": { "1": { - "name": "string.regexp.classic.ruby" + "name": "string.regexp.interpolated.ruby" }, "2": { - "name": "punctuation.definition.string.ruby" + "name": "punctuation.section.regexp.ruby" } }, - "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t", - "contentName": "string.regexp.classic.ruby", + "comment": "regular expression literal with interpolation", + "contentName": "string.regexp.interpolated.ruby", "end": "((/[eimnosux]*))", "patterns": [ { @@ -540,6 +523,990 @@ } ] }, + { + "begin": "%r{", + "beginCaptures": { + "0": { + "name": "punctuation.section.regexp.begin.ruby" + } + }, + "end": "}[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.section.regexp.end.ruby" + } + }, + "name": "string.regexp.interpolated.ruby", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_curly_r" + } + ] + }, + { + "begin": "%r\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.regexp.begin.ruby" + } + }, + "end": "][eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.section.regexp.end.ruby" + } + }, + "name": "string.regexp.interpolated.ruby", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_brackets_r" + } + ] + }, + { + "begin": "%r\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.regexp.begin.ruby" + } + }, + "end": "\\)[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.section.regexp.end.ruby" + } + }, + "name": "string.regexp.interpolated.ruby", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_parens_r" + } + ] + }, + { + "begin": "%r<", + "beginCaptures": { + "0": { + "name": "punctuation.section.regexp.begin.ruby" + } + }, + "end": ">[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.section.regexp.end.ruby" + } + }, + "name": "string.regexp.interpolated.ruby", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_ltgt_r" + } + ] + }, + { + "begin": "%r([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.section.regexp.begin.ruby" + } + }, + "end": "\\1[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.section.regexp.end.ruby" + } + }, + "name": "string.regexp.interpolated.ruby", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "begin": "%I\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_brackets_i" + } + ] + }, + { + "begin": "%I\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + { + "begin": "%I<", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + { + "begin": "%I{", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_curly_i" + } + ] + }, + { + "begin": "%I([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "%i\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_brackets" + } + ] + }, + { + "begin": "%i\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_parens" + } + ] + }, + { + "begin": "%i<", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_ltgt" + } + ] + }, + { + "begin": "%i{", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_curly" + } + ] + }, + { + "begin": "%i([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "comment": "Cant be named because its not necessarily an escape.", + "match": "\\\\." + } + ] + }, + { + "begin": "%W\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_brackets_i" + } + ] + }, + { + "begin": "%W\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + { + "begin": "%W<", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + { + "begin": "%W{", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_curly_i" + } + ] + }, + { + "begin": "%W([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "%w\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_brackets" + } + ] + }, + { + "begin": "%w\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_parens" + } + ] + }, + { + "begin": "%w<", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_ltgt" + } + ] + }, + { + "begin": "%w{", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_curly" + } + ] + }, + { + "begin": "%w([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "comment": "Cant be named because its not necessarily an escape.", + "match": "\\\\." + } + ] + }, + { + "begin": "%[Qx]?\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + { + "begin": "%[Qx]?\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_brackets_i" + } + ] + }, + { + "begin": "%[Qx]?{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_curly_i" + } + ] + }, + { + "begin": "%[Qx]?<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + { + "begin": "%[Qx]([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "%([^\\w\\s=])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "%q\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_parens" + } + ] + }, + { + "begin": "%q<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_ltgt" + } + ] + }, + { + "begin": "%q\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_brackets" + } + ] + }, + { + "begin": "%q{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "match": "\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_curly" + } + ] + }, + { + "begin": "%q([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "comment": "Cant be named because its not necessarily an escape.", + "match": "\\\\." + } + ] + }, + { + "begin": "%s\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.symbol.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_parens" + } + ] + }, + { + "begin": "%s<", + "beginCaptures": { + "0": { + "name": "punctuation.definition.symbol.begin.ruby" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_ltgt" + } + ] + }, + { + "begin": "%s\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.symbol.begin.ruby" + } + }, + "end": "]", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_brackets" + } + ] + }, + { + "begin": "%s{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.symbol.begin.ruby" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "match": "\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "include": "#nest_curly" + } + ] + }, + { + "begin": "%s([^\\w])", + "beginCaptures": { + "0": { + "name": "punctuation.definition.symbol.begin.ruby" + } + }, + "end": "\\1", + "endCaptures": { + "0": { + "name": "punctuation.definition.symbol.end.ruby" + } + }, + "name": "constant.language.symbol.ruby", + "patterns": [ + { + "comment": "Cant be named because its not necessarily an escape.", + "match": "\\\\." + } + ] + }, { "captures": { "1": { @@ -547,8 +1514,8 @@ } }, "comment": "symbols", - "match": "(?[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|(@@?|\\$)[a-zA-Z_]\\w*)", - "name": "constant.other.symbol.ruby" + "match": "(?x)\n(?\n [$a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?\n |\n ===?|<=>|>[>=]?|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n |\n @@?[a-zA-Z_]\\w*\n)", + "name": "constant.language.symbol.ruby" }, { "begin": "^=begin", @@ -561,6 +1528,9 @@ "end": "^=end", "name": "comment.block.documentation.ruby" }, + { + "include": "#yard" + }, { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { @@ -588,20 +1558,43 @@ "name": "constant.numeric.ruby" }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1))", - "comment": "Heredoc with embedded html", + "begin": "^__END__\\n", + "captures": { + "0": { + "name": "string.unquoted.program-block.ruby" + } + }, + "comment": "__END__ marker", + "contentName": "text.plain", + "end": "(?=not)impossible", + "patterns": [ + { + "begin": "(?=<<[-~]([\"'`]?)((?:[_\\w]+_|)HTML)\\b\\1))", + "comment": "Heredoc with embedded HTML", "end": "(?!\\G)", "name": "meta.embedded.block.html", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)HTML)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "text.html", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -626,20 +1619,58 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1))", - "comment": "Heredoc with embedded xml", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)HAML)\\b\\1))", + "comment": "Heredoc with embedded HAML", + "end": "(?!\\G)", + "name": "meta.embedded.block.haml", + "patterns": [ + { + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)HAML)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "text.haml", + "end": "^\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "text.haml" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)XML)\\b\\1))", + "comment": "Heredoc with embedded XML", "end": "(?!\\G)", "name": "meta.embedded.block.xml", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)XML)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "text.xml", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -664,20 +1695,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1))", - "comment": "Heredoc with embedded sql", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)SQL)\\b\\1))", + "comment": "Heredoc with embedded SQL", "end": "(?!\\G)", "name": "meta.embedded.block.sql", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)SQL)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.sql", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -702,20 +1733,58 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1))", - "comment": "Heredoc with embedded css", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:GRAPHQL|GQL))\\b\\1))", + "comment": "Heredoc with embedded GraphQL", + "end": "(?!\\G)", + "name": "meta.embedded.block.graphql", + "patterns": [ + { + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:GRAPHQL|GQL))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.graphql", + "end": "^\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.graphql" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)CSS)\\b\\1))", + "comment": "Heredoc with embedded CSS", "end": "(?!\\G)", "name": "meta.embedded.block.css", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)CSS)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.css", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -740,20 +1809,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1))", - "comment": "Heredoc with embedded c++", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)CPP)\\b\\1))", + "comment": "Heredoc with embedded C++", "end": "(?!\\G)", - "name": "meta.embedded.block.c++", + "name": "meta.embedded.block.cpp", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)CPP)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, - "contentName": "source.c++", - "end": "\\s*\\2$\\n?", + "contentName": "source.cpp", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -768,7 +1837,7 @@ "include": "#interpolated_ruby" }, { - "include": "source.c++" + "include": "source.cpp" }, { "include": "#escaped_char" @@ -778,20 +1847,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1))", - "comment": "Heredoc with embedded c", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)C)\\b\\1))", + "comment": "Heredoc with embedded C", "end": "(?!\\G)", "name": "meta.embedded.block.c", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)C)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.c", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -816,20 +1885,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))", - "comment": "Heredoc with embedded javascript", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))", + "comment": "Heredoc with embedded Javascript", "end": "(?!\\G)", "name": "meta.embedded.block.js", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.js", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -854,20 +1923,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))", - "comment": "Heredoc with embedded jQuery javascript", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)JQUERY)\\b\\1))", + "comment": "Heredoc with embedded jQuery Javascript", "end": "(?!\\G)", "name": "meta.embedded.block.js.jquery", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)JQUERY)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.js.jquery", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -892,20 +1961,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))", - "comment": "Heredoc with embedded shell", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))", + "comment": "Heredoc with embedded Shell", "end": "(?!\\G)", "name": "meta.embedded.block.shell", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.shell", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -930,20 +1999,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1))", - "comment": "Heredoc with embedded lua", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)LUA)\\b\\1))", + "comment": "Heredoc with embedded Lua", "end": "(?!\\G)", "name": "meta.embedded.block.lua", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)LUA)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.lua", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -968,20 +2037,20 @@ ] }, { - "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1))", - "comment": "Heredoc with embedded ruby", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)RUBY)\\b\\1))", + "comment": "Heredoc with embedded Ruby", "end": "(?!\\G)", "name": "meta.embedded.block.ruby", "patterns": [ { - "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1)", + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)RUBY)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.ruby", - "end": "\\s*\\2$\\n?", + "end": "^\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -1006,13 +2075,89 @@ ] }, { - "begin": "(?>=\\s*<<(\\w+))", + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:YAML|YML))\\b\\1))", + "comment": "Heredoc with embedded YAML", + "end": "(?!\\G)", + "name": "meta.embedded.block.yaml", + "patterns": [ + { + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)(?:YAML|YML))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.yaml", + "end": "^\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.yaml" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~]([\"'`]?)((?:[_\\w]+_|)SLIM)\\b\\1))", + "comment": "Heredoc with embedded Slim", + "end": "(?!\\G)", + "name": "meta.embedded.block.slim", + "patterns": [ + { + "begin": "(?><<[-~]([\"'`]?)((?:[_\\w]+_|)SLIM)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "text.slim", + "end": "^\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "text.slim" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?>=\\s*<<([\"'`]?)(\\w+)\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, - "end": "^\\1$", + "end": "^\\2$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -1032,14 +2177,21 @@ ] }, { - "begin": "(?><<[-~](\\w+))", + "begin": "(?>((<<[-~]([\"'`]?)(\\w+)\\3,\\s?)*<<[-~]([\"'`]?)(\\w+)\\5))(.*)", "beginCaptures": { - "0": { + "1": { "name": "punctuation.definition.string.begin.ruby" + }, + "7": { + "patterns": [ + { + "include": "source.ruby" + } + ] } }, - "comment": "heredoc with indented terminator", - "end": "\\s*\\1$", + "comment": "heredoc with multiple inputs and indented terminator", + "end": "^\\s*\\6$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" @@ -1059,20 +2211,34 @@ ] }, { - "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)", + "begin": "(?<={|{\\s|[^A-Za-z0-9_:@$]do|^do|[^A-Za-z0-9_:@$]do\\s|^do\\s)(\\|)", + "name": "meta.block.parameters.ruby", "captures": { "1": { - "name": "punctuation.separator.arguments.ruby" + "name": "punctuation.separator.variable.ruby" } }, "end": "(?", - "name": "support.function.kernel.lambda.ruby" + "name": "support.function.kernel.ruby" }, { "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<", @@ -1101,18 +2267,17 @@ "name": "keyword.operator.logical.ruby" }, { - "comment": "Make sure this goes after assignment and comparison", - "match": "(?<=^|[ \\t])!|&&|\\|\\||\\^", + "match": "(?<=^|[ \\t!])!|&&|\\|\\||\\^", "name": "keyword.operator.logical.ruby" }, { + "comment": "Safe navigation operator", + "match": "(&\\.)\\s*(?![A-Z])", "captures": { "1": { - "name": "punctuation.separator.method.ruby" + "name": "keyword.operator.logical.ruby" } - }, - "comment": "Safe navigation operator - Added in 2.3", - "match": "(&\\.)\\s*(?![A-Z])" + } }, { "match": "(%|&|\\*\\*|\\*|\\+|-|/)", @@ -1135,22 +2300,22 @@ "name": "punctuation.separator.object.ruby" }, { + "comment": "Mark as namespace separator if double colons followed by capital letter", + "match": "(::)\\s*(?=[A-Z])", "captures": { "1": { "name": "punctuation.separator.namespace.ruby" } - }, - "comment": "Mark as namespace separator if double colons followed by capital letter", - "match": "(::)\\s*(?=[A-Z])" + } }, { + "comment": "Mark as method separator if double colons not followed by capital letter", + "match": "(\\.|::)\\s*(?![A-Z])", "captures": { "1": { "name": "punctuation.separator.method.ruby" } - }, - "comment": "Mark as method separator if double colons not followed by capital letter", - "match": "(\\.|::)\\s*(?![A-Z])" + } }, { "comment": "Must come after method and constant separators to prefer double colons", @@ -1158,11 +2323,11 @@ "name": "punctuation.separator.other.ruby" }, { - "match": "\\{", + "match": "{", "name": "punctuation.section.scope.begin.ruby" }, { - "match": "\\}", + "match": "}", "name": "punctuation.section.scope.end.ruby" }, { @@ -1170,15 +2335,171 @@ "name": "punctuation.section.array.begin.ruby" }, { - "match": "\\]", + "match": "]", "name": "punctuation.section.array.end.ruby" }, { "match": "\\(|\\)", "name": "punctuation.section.function.ruby" + }, + { + "name": "meta.function-call.ruby", + "begin": "(?<=[^\\.]\\.|::)(?=[a-zA-Z][a-zA-Z0-9_!?]*[^a-zA-Z0-9_!?])", + "end": "(?<=[a-zA-Z0-9_!?])(?=[^a-zA-Z0-9_!?])", + "patterns": [ + { + "name": "entity.name.function.ruby", + "match": "([a-zA-Z][a-zA-Z0-9_!?]*)(?=[^a-zA-Z0-9_!?])" + } + ] + }, + { + "begin": "([a-zA-Z]\\w*[!?]?)(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.ruby" + }, + "2": { + "name": "punctuation.section.function.ruby" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.function.ruby" + } + }, + "name": "meta.function-call.ruby", + "patterns": [ + { + "include": "$self" + } + ] } ], "repository": { + "method_parameters": { + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "#brackets" + }, + { + "include": "#params" + }, + { + "include": "$self" + } + ], + "repository": { + "params": { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G(&|\\*\\*?)?(?:([_a-zA-Z]\\w*[?!]?(:))|([_a-zA-Z]\\w*))" + }, + "braces": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.scope.begin.ruby" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.scope.end.ruby" + } + }, + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "#brackets" + }, + { + "include": "$self" + } + ] + }, + "brackets": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "#brackets" + }, + { + "include": "$self" + } + ] + }, + "parens": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.function.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.function.end.ruby" + } + }, + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#braces" + }, + { + "include": "#brackets" + }, + { + "include": "$self" + } + ] + } + } + }, "escaped_char": { "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", "name": "constant.character.escape.ruby" @@ -1195,20 +2516,17 @@ "interpolated_ruby": { "patterns": [ { - "begin": "#\\{", + "begin": "#{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.ruby" } }, "contentName": "source.ruby", - "end": "(\\})", + "end": "}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.ruby" - }, - "1": { - "name": "source.ruby" } }, "name": "meta.embedded.line.ruby", @@ -1219,30 +2537,7 @@ { "include": "$self" } - ], - "repository": { - "nest_curly_and_self": { - "patterns": [ - { - "begin": "\\{", - "captures": { - "0": { - "name": "punctuation.section.scope.ruby" - } - }, - "end": "\\}", - "patterns": [ - { - "include": "#nest_curly_and_self" - } - ] - }, - { - "include": "$self" - } - ] - } - } + ] }, { "captures": { @@ -1273,1413 +2568,228 @@ } ] }, - "percent_literals": { + "nest_brackets": { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "]", "patterns": [ { - "begin": "%i(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.section.array.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.section.array.end.ruby" - } - }, - "name": "meta.array.symbol.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#symbol" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#symbol" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#symbol" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#symbol" - } - ] - }, - { - "include": "#symbol" - } - ], - "repository": { - "angles": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\<|\\\\>", - "name": "constant.other.symbol.ruby" - }, - { - "begin": "<", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": ">", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\{|\\\\\\}", - "name": "constant.other.symbol.ruby" - }, - { - "begin": "\\{", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": "\\}", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\[|\\\\\\]", - "name": "constant.other.symbol.ruby" - }, - { - "begin": "\\[", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\(|\\\\\\)", - "name": "constant.other.symbol.ruby" - }, - { - "begin": "\\(", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": "\\)", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "symbol": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\\\|\\\\[ ]", - "name": "constant.other.symbol.ruby" - }, - { - "match": "\\S\\w*", - "name": "constant.other.symbol.ruby" - } - ] - } - } + "include": "#nest_brackets" + } + ] + }, + "nest_brackets_i": { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "]", + "patterns": [ + { + "include": "#interpolated_ruby" }, { - "begin": "%I(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.section.array.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.section.array.end.ruby" - } - }, - "name": "meta.array.symbol.interpolated.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#symbol" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#symbol" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#symbol" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#symbol" - } - ] - }, - { - "include": "#symbol" - } - ], - "repository": { - "angles": { - "patterns": [ - { - "begin": "<", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": ">", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "begin": "\\{", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": "\\}", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "begin": "\\[", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "begin": "\\(", - "captures": { - "0": { - "name": "constant.other.symbol.ruby" - } - }, - "end": "\\)", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#symbol" - } - ] - } - ] - }, - "symbol": { - "patterns": [ - { - "begin": "(?=\\\\|#\\{)", - "end": "(?!\\G)", - "name": "constant.other.symbol.ruby", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - } - ] - }, - { - "match": "\\S\\w*", - "name": "constant.other.symbol.ruby" - } - ] - } - } + "include": "#escaped_char" }, { - "begin": "%q(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.ruby" - } - }, - "name": "string.quoted.other.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - } - ] - } - ], - "repository": { - "angles": { - "patterns": [ - { - "match": "\\\\<|\\\\>|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "<", - "end": ">", - "patterns": [ - { - "include": "#angles" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "match": "\\\\\\{|\\\\\\}|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#braces" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "match": "\\\\\\[|\\\\\\]|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "match": "\\\\\\(|\\\\\\)|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#parens" - } - ] - } - ] - } - } + "include": "#nest_brackets_i" + } + ] + }, + "nest_brackets_r": { + "begin": "\\[", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "]", + "patterns": [ + { + "include": "#regex_sub" }, { - "begin": "%Q?(?:([(\\[{<])|([^\\w\\s=]|_))", - "beginCaptures": { + "include": "#nest_brackets_r" + } + ] + }, + "nest_curly": { + "begin": "{", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "}", + "patterns": [ + { + "include": "#nest_curly" + } + ] + }, + "nest_curly_and_self": { + "patterns": [ + { + "begin": "{", + "captures": { "0": { - "name": "punctuation.definition.string.begin.ruby" + "name": "punctuation.section.scope.ruby" } }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.ruby" - } - }, - "name": "string.quoted.other.interpolated.ruby", + "end": "}", "patterns": [ { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - } - ] - }, - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" + "include": "#nest_curly_and_self" } - ], - "repository": { - "angles": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "<", - "end": ">", - "patterns": [ - { - "include": "#angles" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#braces" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#parens" - } - ] - } - ] - } - } + ] }, { - "begin": "%r(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.ruby" - } - }, - "end": "([)\\]}>]\\2|\\1\\2)[eimnosux]*", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.ruby" - } - }, - "name": "string.regexp.percent.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - } - ] - }, - { - "include": "#regex_sub" - } - ], - "repository": { - "angles": { - "patterns": [ - { - "include": "#regex_sub" - }, - { - "begin": "<", - "end": ">", - "patterns": [ - { - "include": "#angles" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "include": "#regex_sub" - }, - { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#braces" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "include": "#regex_sub" - }, - { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "include": "#regex_sub" - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#parens" - } - ] - } - ] - } - } + "include": "$self" + } + ] + }, + "nest_curly_i": { + "begin": "{", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "}", + "patterns": [ + { + "include": "#interpolated_ruby" }, { - "begin": "%s(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.definition.constant.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.definition.constant.end.ruby" - } - }, - "name": "constant.other.symbol.percent.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - } - ] - } - ], - "repository": { - "angles": { - "patterns": [ - { - "match": "\\\\<|\\\\>|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "<", - "end": ">", - "patterns": [ - { - "include": "#angles" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "match": "\\\\\\{|\\\\\\}|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#braces" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "match": "\\\\\\[|\\\\\\]|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "match": "\\\\\\(|\\\\\\)|\\\\\\\\", - "name": "constant.character.escape.ruby" - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#parens" - } - ] - } - ] - } - } + "include": "#escaped_char" }, { - "begin": "%w(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.section.array.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.section.array.end.ruby" - } - }, - "name": "meta.array.string.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#string" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#string" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#string" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#string" - } - ] - }, - { - "include": "#string" - } - ], - "repository": { - "angles": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\<|\\\\>", - "name": "string.other.ruby" - }, - { - "begin": "<", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": ">", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#string" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\{|\\\\\\}", - "name": "string.other.ruby" - }, - { - "begin": "\\{", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": "\\}", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#string" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\[|\\\\\\]", - "name": "string.other.ruby" - }, - { - "begin": "\\[", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#string" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\(|\\\\\\)", - "name": "string.other.ruby" - }, - { - "begin": "\\(", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": "\\)", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#string" - } - ] - } - ] - }, - "string": { - "patterns": [ - { - "captures": { - "0": { - "name": "constant.character.escape.ruby" - } - }, - "match": "\\\\\\\\|\\\\[ ]", - "name": "string.other.ruby" - }, - { - "match": "\\S\\w*", - "name": "string.other.ruby" - } - ] - } - } + "include": "#nest_curly_i" + } + ] + }, + "nest_curly_r": { + "begin": "{", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "}", + "patterns": [ + { + "include": "#regex_sub" }, { - "begin": "%W(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.section.array.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.section.array.end.ruby" - } - }, - "name": "meta.array.string.interpolated.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#string" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#string" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#string" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#string" - } - ] - }, - { - "include": "#string" - } - ], - "repository": { - "angles": { - "patterns": [ - { - "begin": "<", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": ">", - "patterns": [ - { - "include": "#angles" - }, - { - "include": "#string" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "begin": "\\{", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": "\\}", - "patterns": [ - { - "include": "#braces" - }, - { - "include": "#string" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "begin": "\\[", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - }, - { - "include": "#string" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "begin": "\\(", - "captures": { - "0": { - "name": "string.other.ruby" - } - }, - "end": "\\)", - "patterns": [ - { - "include": "#parens" - }, - { - "include": "#string" - } - ] - } - ] - }, - "string": { - "patterns": [ - { - "begin": "(?=\\\\|#\\{)", - "end": "(?!\\G)", - "name": "string.other.ruby", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - } - ] - }, - { - "match": "\\S\\w*", - "name": "string.other.ruby" - } - ] - } - } + "include": "#nest_curly_r" + } + ] + }, + "nest_ltgt": { + "begin": "<", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#nest_ltgt" + } + ] + }, + "nest_ltgt_i": { + "begin": "<", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#interpolated_ruby" }, { - "begin": "%x(?:([(\\[{<])|([^\\w\\s]|_))", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.ruby" - } - }, - "end": "[)\\]}>]\\2|\\1\\2", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.ruby" - } - }, - "name": "string.interpolated.percent.ruby", - "patterns": [ - { - "begin": "\\G(?<=\\()(?!\\))", - "end": "(?=\\))", - "patterns": [ - { - "include": "#parens" - } - ] - }, - { - "begin": "\\G(?<=\\[)(?!\\])", - "end": "(?=\\])", - "patterns": [ - { - "include": "#brackets" - } - ] - }, - { - "begin": "\\G(?<=\\{)(?!\\})", - "end": "(?=\\})", - "patterns": [ - { - "include": "#braces" - } - ] - }, - { - "begin": "\\G(?<=<)(?!>)", - "end": "(?=>)", - "patterns": [ - { - "include": "#angles" - } - ] - }, - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - } - ], - "repository": { - "angles": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "<", - "end": ">", - "patterns": [ - { - "include": "#angles" - } - ] - } - ] - }, - "braces": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#braces" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#brackets" - } - ] - } - ] - }, - "parens": { - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#interpolated_ruby" - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#parens" - } - ] - } - ] - } - } + "include": "#escaped_char" + }, + { + "include": "#nest_ltgt_i" + } + ] + }, + "nest_ltgt_r": { + "begin": "<", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_ltgt_r" + } + ] + }, + "nest_parens": { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#nest_parens" + } + ] + }, + "nest_parens_i": { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "include": "#nest_parens_i" + } + ] + }, + "nest_parens_r": { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#regex_sub" + }, + { + "include": "#nest_parens_r" } ] }, @@ -2694,29 +2804,24 @@ { "captures": { "1": { - "name": "punctuation.definition.quantifier.begin.ruby" + "name": "punctuation.definition.arbitrary-repetition.ruby" }, "3": { - "name": "punctuation.definition.quantifier.end.ruby" + "name": "punctuation.definition.arbitrary-repetition.ruby" } }, - "match": "(\\{)\\d+(,\\d+)?(\\})", - "name": "keyword.operator.quantifier.ruby" + "match": "({)\\d+(,\\d+)?(})", + "name": "string.regexp.arbitrary-repetition.ruby" }, { - "begin": "\\[\\^?", - "beginCaptures": { + "begin": "\\[(?:\\^?])?", + "captures": { "0": { - "name": "punctuation.definition.character-class.begin.ruby" + "name": "punctuation.definition.character-class.ruby" } }, - "end": "\\]", - "endCaptures": { - "0": { - "name": "punctuation.definition.character-class.end.ruby" - } - }, - "name": "constant.other.character-class.set.ruby", + "end": "]", + "name": "string.regexp.character-class.ruby", "patterns": [ { "include": "#escaped_char" @@ -2751,7 +2856,7 @@ } }, "end": "\\)", - "name": "meta.group.regexp.ruby", + "name": "string.regexp.group.ruby", "patterns": [ { "include": "#regex_sub" @@ -2767,9 +2872,328 @@ }, "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", "end": "$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, "name": "comment.line.number-sign.ruby" } ] + }, + "yard": { + "patterns": [ + { + "include": "#yard_comment" + }, + { + "include": "#yard_param_types" + }, + { + "include": "#yard_option" + }, + { + "include": "#yard_tag" + }, + { + "include": "#yard_types" + }, + { + "include": "#yard_directive" + }, + { + "include": "#yard_see" + }, + { + "include": "#yard_macro_attribute" + } + ] + }, + "yard_see": { + "comment": "separate rule for @see because name could contain url", + "begin": "^(\\s*)(#)(\\s*)(@)(see)(?=\\s)(\\s+(.+?))?(?=\\s|$)", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + }, + "7": { + "name": "comment.line.parameter.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_macro_attribute": { + "comment": "separate rule for attribute and macro tags because name goes after []", + "begin": "^(\\s*)(#)(\\s*)(@!)(attribute|macro)(\\s+((\\[).+(])))?(?=\\s)(\\s+([a-z_]\\w*:?))?", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + }, + "7": { + "name": "comment.line.type.yard.ruby" + }, + "8": { + "name": "comment.line.punctuation.yard.ruby" + }, + "9": { + "name": "comment.line.punctuation.yard.ruby" + }, + "11": { + "name": "comment.line.parameter.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_comment": { + "comment": "For YARD tags that follow the tag-comment pattern", + "begin": "^(\\s*)(#)(\\s*)(@)(abstract|api|author|deprecated|example|macro|note|overload|since|todo|version)(?=\\s|$)", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_param_types": { + "comment": "For YARD tags that follow the tag-name-types-description or tag-types-name-description pattern", + "begin": "^(\\s*)(#)(\\s*)(@)(attr|attr_reader|attr_writer|yieldparam|param)(?=\\s)(?>\\s+(?>([a-z_]\\w*:?)|((\\[).+(]))))?(?>\\s+(?>((\\[).+(]))|([a-z_]\\w*:?)))?", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + }, + "6": { + "name": "comment.line.parameter.yard.ruby" + }, + "7": { + "name": "comment.line.type.yard.ruby" + }, + "8": { + "name": "comment.line.punctuation.yard.ruby" + }, + "9": { + "name": "comment.line.punctuation.yard.ruby" + }, + "10": { + "name": "comment.line.type.yard.ruby" + }, + "11": { + "name": "comment.line.punctuation.yard.ruby" + }, + "12": { + "name": "comment.line.punctuation.yard.ruby" + }, + "13": { + "name": "comment.line.parameter.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_option": { + "comment": "For YARD option tag that follow the tag-name-types-key-(value)-description pattern", + "begin": "^(\\s*)(#)(\\s*)(@)(option)(?=\\s)(?>\\s+([a-z_]\\w*:?))?(?>\\s+((\\[).+(])))?(?>\\s+((\\S*)))?(?>\\s+((\\().+(\\))))?", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + }, + "6": { + "name": "comment.line.parameter.yard.ruby" + }, + "7": { + "name": "comment.line.type.yard.ruby" + }, + "8": { + "name": "comment.line.punctuation.yard.ruby" + }, + "9": { + "name": "comment.line.punctuation.yard.ruby" + }, + "10": { + "name": "comment.line.keyword.yard.ruby" + }, + "11": { + "name": "comment.line.hashkey.yard.ruby" + }, + "12": { + "name": "comment.line.defaultvalue.yard.ruby" + }, + "13": { + "name": "comment.line.punctuation.yard.ruby" + }, + "14": { + "name": "comment.line.punctuation.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_tag": { + "comment": "For YARD tags that are just the tag", + "match": "^(\\s*)(#)(\\s*)(@)(private)$", + "captures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + } + }, + "name": "comment.line.number-sign.ruby" + }, + "yard_types": { + "comment": "For YARD tags that follow the tag-types-comment pattern", + "begin": "^(\\s*)(#)(\\s*)(@)(raise|return|yield(?:return)?)(?=\\s)(\\s+((\\[).+(])))?", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + }, + "7": { + "name": "comment.line.type.yard.ruby" + }, + "8": { + "name": "comment.line.punctuation.yard.ruby" + }, + "9": { + "name": "comment.line.punctuation.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_directive": { + "comment": "For YARD directives", + "begin": "^(\\s*)(#)(\\s*)(@!)(endgroup|group|method|parse|scope|visibility)(\\s+((\\[).+(])))?(?=\\s)", + "beginCaptures": { + "2": { + "name": "punctuation.definition.comment.ruby" + }, + "4": { + "name": "comment.line.keyword.punctuation.yard.ruby" + }, + "5": { + "name": "comment.line.keyword.yard.ruby" + }, + "7": { + "name": "comment.line.type.yard.ruby" + }, + "8": { + "name": "comment.line.punctuation.yard.ruby" + }, + "9": { + "name": "comment.line.punctuation.yard.ruby" + } + }, + "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)", + "contentName": "comment.line.string.yard.ruby", + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#yard" + }, + { + "include": "#yard_continuation" + } + ] + }, + "yard_continuation": { + "match": "^\\s*#", + "name": "punctuation.definition.comment.ruby" } } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/dark_plus.json b/extensions/theme-defaults/themes/dark_plus.json index 5565e2dbec6..8328860a9ff 100644 --- a/extensions/theme-defaults/themes/dark_plus.json +++ b/extensions/theme-defaults/themes/dark_plus.json @@ -64,7 +64,8 @@ "support.constant.math", "support.constant.dom", "support.constant.json", - "entity.other.inherited-class" + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" ], "settings": { "foreground": "#4EC9B0" diff --git a/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json index ebb49d98644..b3a1a1f065f 100644 --- a/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -395,7 +395,8 @@ "support.constant.math", "support.constant.dom", "support.constant.json", - "entity.other.inherited-class" + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" ], "settings": { "foreground": "#4EC9B0" diff --git a/extensions/theme-defaults/themes/hc_light.json b/extensions/theme-defaults/themes/hc_light.json index 460f26ad738..6d192e76757 100644 --- a/extensions/theme-defaults/themes/hc_light.json +++ b/extensions/theme-defaults/themes/hc_light.json @@ -429,7 +429,8 @@ "support.constant.math", "support.constant.dom", "support.constant.json", - "entity.other.inherited-class" + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" ], "settings": { "foreground": "#185E73" diff --git a/extensions/theme-defaults/themes/light_plus.json b/extensions/theme-defaults/themes/light_plus.json index 7f77883f3ee..b1b4e45c2fe 100644 --- a/extensions/theme-defaults/themes/light_plus.json +++ b/extensions/theme-defaults/themes/light_plus.json @@ -64,7 +64,8 @@ "support.constant.math", "support.constant.dom", "support.constant.json", - "entity.other.inherited-class" + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" ], "settings": { "foreground": "#267f99" diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index ec50a96586a..d526a33e9a8 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -187,7 +187,8 @@ "scope": [ "string", "constant.other.symbol", - "entity.other.inherited-class" + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" ], "settings": { "foreground": "#889b4a" diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 3f41fb052e0..a79ad385326 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -160,7 +160,10 @@ }, { "name": "Inherited class", - "scope": "entity.other.inherited-class", + "scope": [ + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" + ], "settings": { "fontStyle": "", "foreground": "#C7444A" diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 9a510748714..829b33b9355 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -213,7 +213,10 @@ }, { "name": "Inherited class", - "scope": "entity.other.inherited-class", + "scope": [ + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" + ], "settings": { "fontStyle": "italic underline", "foreground": "#A6E22E" diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 0b6cd0be740..47d78a679cb 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -127,6 +127,7 @@ "entity.name.namespace", "entity.name.scope-resolution", "entity.other.inherited-class", + "punctuation.separator.namespace.ruby", "support.class" ], "settings": { diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 233fd9e83da..4625df1a5d5 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -150,8 +150,11 @@ }, { "name": "Entity inherited-class", - "scope": "entity.other.inherited-class", - "settings": { + "scope": [ + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" + ], + "settings": { "fontStyle": "underline", "foreground": "#aa5507ff" } diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index e67135a9d99..af1e7a913ff 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -140,7 +140,10 @@ }, { "name": "Inherited class", - "scope": "entity.other.inherited-class", + "scope": [ + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby" + ], "settings": { "foreground": "#6C71C4" } diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index d5f6dc11bf0..11a71e6635b 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -140,7 +140,10 @@ }, { "name": "Inherited class", - "scope": "entity.other.inherited-class", + "scope": [ + "entity.other.inherited-class", + "punctuation.separator.namespace.ruby", + ], "settings": { "foreground": "#6C71C4" } diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json index 89bc8acd36f..3d313ef2e1e 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json @@ -117,7 +117,7 @@ }, { "name": "String, Symbols, Inherited Class, Markup Heading, GitGutter inserted", - "scope": "string, constant.other.symbol, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter", + "scope": "string, constant.other.symbol, entity.other.inherited-class, punctuation.separator.namespace.ruby, markup.heading, markup.inserted.git_gutter", "settings": { "fontStyle": "", "foreground": "#D1F1A9" diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json b/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json index d36726f9866..6230a5f14b3 100644 --- a/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json @@ -113,7 +113,7 @@ }, { "c": "module", - "t": "source.ruby meta.module.ruby keyword.control.module.ruby", + "t": "source.ruby keyword.control.ruby", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -127,7 +127,7 @@ }, { "c": " ", - "t": "source.ruby meta.module.ruby", + "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -141,72 +141,72 @@ }, { "c": "Azure", - "t": "source.ruby meta.module.ruby entity.name.type.module.ruby entity.other.inherited-class.module.first.ruby", + "t": "source.ruby support.class.ruby", "r": { - "dark_plus": "entity.other.inherited-class: #4EC9B0", - "light_plus": "entity.other.inherited-class: #267F99", + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.other.inherited-class: #4EC9B0", - "dark_modern": "entity.other.inherited-class: #4EC9B0", - "hc_light": "entity.other.inherited-class: #185E73", - "light_modern": "entity.other.inherited-class: #267F99" + "hc_black": "support.class: #4EC9B0", + "dark_modern": "support.class: #4EC9B0", + "hc_light": "support.class: #185E73", + "light_modern": "support.class: #267F99" } }, { "c": "::", - "t": "source.ruby meta.module.ruby entity.name.type.module.ruby entity.other.inherited-class.module.first.ruby punctuation.separator.inheritance.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { - "dark_plus": "entity.other.inherited-class: #4EC9B0", - "light_plus": "entity.other.inherited-class: #267F99", + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.other.inherited-class: #4EC9B0", - "dark_modern": "entity.other.inherited-class: #4EC9B0", - "hc_light": "entity.other.inherited-class: #185E73", - "light_modern": "entity.other.inherited-class: #267F99" + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" } }, { "c": "ARM", - "t": "source.ruby meta.module.ruby entity.name.type.module.ruby entity.other.inherited-class.module.second.ruby", + "t": "source.ruby support.class.ruby", "r": { - "dark_plus": "entity.other.inherited-class: #4EC9B0", - "light_plus": "entity.other.inherited-class: #267F99", + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.other.inherited-class: #4EC9B0", - "dark_modern": "entity.other.inherited-class: #4EC9B0", - "hc_light": "entity.other.inherited-class: #185E73", - "light_modern": "entity.other.inherited-class: #267F99" + "hc_black": "support.class: #4EC9B0", + "dark_modern": "support.class: #4EC9B0", + "hc_light": "support.class: #185E73", + "light_modern": "support.class: #267F99" } }, { "c": "::", - "t": "source.ruby meta.module.ruby entity.name.type.module.ruby entity.other.inherited-class.module.second.ruby punctuation.separator.inheritance.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { - "dark_plus": "entity.other.inherited-class: #4EC9B0", - "light_plus": "entity.other.inherited-class: #267F99", + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.other.inherited-class: #4EC9B0", - "dark_modern": "entity.other.inherited-class: #4EC9B0", - "hc_light": "entity.other.inherited-class: #185E73", - "light_modern": "entity.other.inherited-class: #267F99" + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" } }, { "c": "Scheduler", - "t": "source.ruby meta.module.ruby entity.name.type.module.ruby", + "t": "source.ruby variable.other.constant.ruby", "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", + "dark_plus": "variable.other.constant: #4FC1FF", + "light_plus": "variable.other.constant: #0070C1", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0", - "dark_modern": "entity.name.type: #4EC9B0", - "hc_light": "entity.name.type: #185E73", - "light_modern": "entity.name.type: #267F99" + "hc_black": "variable: #9CDCFE", + "dark_modern": "variable.other.constant: #4FC1FF", + "hc_light": "variable.other.constant: #02715D", + "light_modern": "variable.other.constant: #0070C1" } }, { @@ -309,7 +309,7 @@ }, { "c": " ", - "t": "source.ruby meta.class.ruby", + "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -323,7 +323,7 @@ }, { "c": "class", - "t": "source.ruby meta.class.ruby keyword.control.class.ruby", + "t": "source.ruby keyword.control.ruby", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -337,7 +337,7 @@ }, { "c": " ", - "t": "source.ruby meta.class.ruby", + "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -351,21 +351,21 @@ }, { "c": "SchedulerManagementClient", - "t": "source.ruby meta.class.ruby entity.name.type.class.ruby", + "t": "source.ruby variable.other.constant.ruby", "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", + "dark_plus": "variable.other.constant: #4FC1FF", + "light_plus": "variable.other.constant: #0070C1", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0", - "dark_modern": "entity.name.type: #4EC9B0", - "hc_light": "entity.name.type: #185E73", - "light_modern": "entity.name.type: #267F99" + "hc_black": "variable: #9CDCFE", + "dark_modern": "variable.other.constant: #4FC1FF", + "hc_light": "variable.other.constant: #02715D", + "light_modern": "variable.other.constant: #0070C1" } }, { "c": " ", - "t": "source.ruby meta.class.ruby", + "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -379,7 +379,7 @@ }, { "c": "<", - "t": "source.ruby meta.class.ruby keyword.operator.other.ruby", + "t": "source.ruby keyword.operator.comparison.ruby", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -393,7 +393,7 @@ }, { "c": " ", - "t": "source.ruby meta.class.ruby", + "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -406,17 +406,45 @@ } }, { - "c": "MsRestAzure::AzureServiceClient", - "t": "source.ruby meta.class.ruby entity.other.inherited-class.ruby", + "c": "MsRestAzure", + "t": "source.ruby support.class.ruby", "r": { - "dark_plus": "entity.other.inherited-class: #4EC9B0", - "light_plus": "entity.other.inherited-class: #267F99", + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.other.inherited-class: #4EC9B0", - "dark_modern": "entity.other.inherited-class: #4EC9B0", - "hc_light": "entity.other.inherited-class: #185E73", - "light_modern": "entity.other.inherited-class: #267F99" + "hc_black": "support.class: #4EC9B0", + "dark_modern": "support.class: #4EC9B0", + "hc_light": "support.class: #185E73", + "light_modern": "support.class: #267F99" + } + }, + { + "c": "::", + "t": "source.ruby punctuation.separator.namespace.ruby", + "r": { + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" + } + }, + { + "c": "AzureServiceClient", + "t": "source.ruby variable.other.constant.ruby", + "r": { + "dark_plus": "variable.other.constant: #4FC1FF", + "light_plus": "variable.other.constant: #0070C1", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE", + "dark_modern": "variable.other.constant: #4FC1FF", + "hc_light": "variable.other.constant: #02715D", + "light_modern": "variable.other.constant: #0070C1" } }, { @@ -479,14 +507,14 @@ "c": "::", "t": "source.ruby punctuation.separator.namespace.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" } }, { @@ -507,14 +535,14 @@ "c": "::", "t": "source.ruby punctuation.separator.namespace.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" } }, { @@ -535,14 +563,14 @@ "c": "::", "t": "source.ruby punctuation.separator.namespace.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" } }, { @@ -617,16 +645,16 @@ }, { "c": " ", - "t": "source.ruby punctuation.whitespace.comment.leading.ruby", + "t": "source.ruby comment.line.number-sign.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" } }, { @@ -644,7 +672,7 @@ } }, { - "c": " @return job_collections", + "c": " ", "t": "source.ruby comment.line.number-sign.ruby", "r": { "dark_plus": "comment: #6A9955", @@ -657,6 +685,48 @@ "light_modern": "comment: #008000" } }, + { + "c": "@", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "return", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " job_collections", + "t": "source.ruby comment.line.number-sign.ruby comment.line.string.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, { "c": " ", "t": "source.ruby", @@ -701,30 +771,30 @@ }, { "c": ":", - "t": "source.ruby constant.other.symbol.ruby punctuation.definition.constant.ruby", + "t": "source.ruby constant.language.symbol.ruby punctuation.definition.constant.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6", + "dark_modern": "constant.language: #569CD6", + "hc_light": "constant.language: #0F4A85", + "light_modern": "constant.language: #0000FF" } }, { "c": "job_collections", - "t": "source.ruby constant.other.symbol.ruby", + "t": "source.ruby constant.language.symbol.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6", + "dark_modern": "constant.language: #569CD6", + "hc_light": "constant.language: #0F4A85", + "light_modern": "constant.language: #0000FF" } }, { @@ -799,34 +869,6 @@ }, { "c": " ", - "t": "source.ruby punctuation.whitespace.comment.leading.ruby", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" - } - }, - { - "c": "#", - "t": "source.ruby comment.line.number-sign.ruby punctuation.definition.comment.ruby", - "r": { - "dark_plus": "comment: #6A9955", - "light_plus": "comment: #008000", - "dark_vs": "comment: #6A9955", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668", - "dark_modern": "comment: #6A9955", - "hc_light": "comment: #515151", - "light_modern": "comment: #008000" - } - }, - { - "c": " @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.", "t": "source.ruby comment.line.number-sign.ruby", "r": { "dark_plus": "comment: #6A9955", @@ -839,20 +881,6 @@ "light_modern": "comment: #008000" } }, - { - "c": " ", - "t": "source.ruby punctuation.whitespace.comment.leading.ruby", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" - } - }, { "c": "#", "t": "source.ruby comment.line.number-sign.ruby punctuation.definition.comment.ruby", @@ -868,7 +896,7 @@ } }, { - "c": " @param base_url [String] the base URI of the service.", + "c": " ", "t": "source.ruby comment.line.number-sign.ruby", "r": { "dark_plus": "comment: #6A9955", @@ -882,22 +910,8 @@ } }, { - "c": " ", - "t": "source.ruby punctuation.whitespace.comment.leading.ruby", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" - } - }, - { - "c": "#", - "t": "source.ruby comment.line.number-sign.ruby punctuation.definition.comment.ruby", + "c": "@", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.punctuation.yard.ruby", "r": { "dark_plus": "comment: #6A9955", "light_plus": "comment: #008000", @@ -910,7 +924,21 @@ } }, { - "c": " @param options [Array] filters to be applied to the HTTP requests.", + "c": "param", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", "t": "source.ruby comment.line.number-sign.ruby", "r": { "dark_plus": "comment: #6A9955", @@ -924,17 +952,101 @@ } }, { - "c": " ", - "t": "source.ruby punctuation.whitespace.comment.leading.ruby", + "c": "credentials", + "t": "source.ruby comment.line.number-sign.ruby comment.line.parameter.yard.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "[", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby comment.line.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "MsRest::ServiceClientCredentials", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "]", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby comment.line.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " credentials to authorize HTTP requests made by the service client.", + "t": "source.ruby comment.line.number-sign.ruby comment.line.string.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" } }, { @@ -951,6 +1063,328 @@ "light_modern": "comment: #008000" } }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "@", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "param", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "base_url", + "t": "source.ruby comment.line.number-sign.ruby comment.line.parameter.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "[", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby comment.line.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "String", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "]", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby comment.line.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " the base URI of the service.", + "t": "source.ruby comment.line.number-sign.ruby comment.line.string.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "#", + "t": "source.ruby comment.line.number-sign.ruby punctuation.definition.comment.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "@", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "param", + "t": "source.ruby comment.line.number-sign.ruby comment.line.keyword.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "options", + "t": "source.ruby comment.line.number-sign.ruby comment.line.parameter.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " ", + "t": "source.ruby comment.line.number-sign.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "[", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby comment.line.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "Array", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": "]", + "t": "source.ruby comment.line.number-sign.ruby comment.line.type.yard.ruby comment.line.punctuation.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " filters to be applied to the HTTP requests.", + "t": "source.ruby comment.line.number-sign.ruby comment.line.string.yard.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, + { + "c": " #", + "t": "source.ruby comment.line.number-sign.ruby comment.line.string.yard.ruby punctuation.definition.comment.ruby", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668", + "dark_modern": "comment: #6A9955", + "hc_light": "comment: #515151", + "light_modern": "comment: #008000" + } + }, { "c": " ", "t": "source.ruby", @@ -1036,7 +1470,21 @@ } }, { - "c": ", ", + "c": ",", + "t": "source.ruby meta.function.method.with-arguments.ruby punctuation.separator.object.ruby", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF", + "dark_modern": "default: #CCCCCC", + "hc_light": "default: #292929", + "light_modern": "default: #3B3B3B" + } + }, + { + "c": " ", "t": "source.ruby meta.function.method.with-arguments.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -1107,7 +1555,7 @@ }, { "c": "nil", - "t": "source.ruby meta.function.method.with-arguments.ruby constant.language.ruby", + "t": "source.ruby meta.function.method.with-arguments.ruby constant.language.nil.ruby", "r": { "dark_plus": "constant.language: #569CD6", "light_plus": "constant.language: #0000FF", @@ -1120,7 +1568,21 @@ } }, { - "c": ", ", + "c": ",", + "t": "source.ruby meta.function.method.with-arguments.ruby punctuation.separator.object.ruby", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF", + "dark_modern": "default: #CCCCCC", + "hc_light": "default: #292929", + "light_modern": "default: #3B3B3B" + } + }, + { + "c": " ", "t": "source.ruby meta.function.method.with-arguments.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -1191,7 +1653,7 @@ }, { "c": "nil", - "t": "source.ruby meta.function.method.with-arguments.ruby constant.language.ruby", + "t": "source.ruby meta.function.method.with-arguments.ruby constant.language.nil.ruby", "r": { "dark_plus": "constant.language: #569CD6", "light_plus": "constant.language: #0000FF", @@ -1653,16 +2115,16 @@ }, { "c": "nil?", - "t": "source.ruby", + "t": "source.ruby meta.function-call.ruby entity.name.function.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "hc_black": "entity.name.function: #DCDCAA", + "dark_modern": "entity.name.function: #DCDCAA", + "hc_light": "entity.name.function: #5E2CBC", + "light_modern": "entity.name.function: #795E26" } }, { @@ -1849,16 +2311,16 @@ }, { "c": "is_a?", - "t": "source.ruby", + "t": "source.ruby meta.function-call.ruby entity.name.function.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "hc_black": "entity.name.function: #DCDCAA", + "dark_modern": "entity.name.function: #DCDCAA", + "hc_light": "entity.name.function: #5E2CBC", + "light_modern": "entity.name.function: #795E26" } }, { @@ -1893,14 +2355,14 @@ "c": "::", "t": "source.ruby punctuation.separator.namespace.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "punctuation.separator.namespace.ruby: #4EC9B0", + "light_plus": "punctuation.separator.namespace.ruby: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "hc_black": "punctuation.separator.namespace.ruby: #4EC9B0", + "dark_modern": "punctuation.separator.namespace.ruby: #4EC9B0", + "hc_light": "punctuation.separator.namespace.ruby: #185E73", + "light_modern": "punctuation.separator.namespace.ruby: #267F99" } }, { @@ -2563,7 +3025,7 @@ }, { "c": "30", - "t": "source.ruby constant.numeric.integer.ruby", + "t": "source.ruby constant.numeric.ruby", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #098658", @@ -2661,7 +3123,7 @@ }, { "c": "true", - "t": "source.ruby constant.language.ruby", + "t": "source.ruby constant.language.boolean.ruby", "r": { "dark_plus": "constant.language: #569CD6", "light_plus": "constant.language: #0000FF", @@ -2744,7 +3206,21 @@ } }, { - "c": "version ", + "c": "version", + "t": "source.ruby meta.function-call.ruby entity.name.function.ruby", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA", + "dark_modern": "entity.name.function: #DCDCAA", + "hc_light": "entity.name.function: #5E2CBC", + "light_modern": "entity.name.function: #795E26" + } + }, + { + "c": " ", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -2787,34 +3263,34 @@ }, { "c": ":", - "t": "source.ruby constant.other.symbol.ruby punctuation.definition.constant.ruby", + "t": "source.ruby constant.language.symbol.ruby punctuation.definition.constant.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6", + "dark_modern": "constant.language: #569CD6", + "hc_light": "constant.language: #0F4A85", + "light_modern": "constant.language: #0000FF" } }, { "c": "mavericks", - "t": "source.ruby constant.other.symbol.ruby", + "t": "source.ruby constant.language.symbol.ruby", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF", - "dark_modern": "default: #CCCCCC", - "hc_light": "default: #292929", - "light_modern": "default: #3B3B3B" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6", + "dark_modern": "constant.language: #569CD6", + "hc_light": "constant.language: #0F4A85", + "light_modern": "constant.language: #0000FF" } }, { - "c": " version ", + "c": " ", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -2828,21 +3304,21 @@ } }, { - "c": "=", - "t": "source.ruby keyword.operator.assignment.ruby", + "c": "version", + "t": "source.ruby variable.ruby", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4", - "dark_modern": "keyword.operator: #D4D4D4", - "hc_light": "keyword.operator: #000000", - "light_modern": "keyword.operator: #000000" + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE", + "dark_modern": "variable: #9CDCFE", + "hc_light": "variable: #001080", + "light_modern": "variable: #001080" } }, { - "c": " ", + "c": " = ", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -2899,7 +3375,7 @@ }, { "c": "}", - "t": "source.ruby string.interpolated.ruby meta.embedded.line.ruby punctuation.section.embedded.end.ruby source.ruby", + "t": "source.ruby string.interpolated.ruby meta.embedded.line.ruby punctuation.section.embedded.end.ruby", "r": { "dark_plus": "punctuation.section.embedded: #569CD6", "light_plus": "punctuation.section.embedded: #0000FF", @@ -2968,7 +3444,7 @@ } }, { - "c": " version ", + "c": " ", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -2982,21 +3458,21 @@ } }, { - "c": "=", - "t": "source.ruby keyword.operator.assignment.ruby", + "c": "version", + "t": "source.ruby variable.ruby", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4", - "dark_modern": "keyword.operator: #D4D4D4", - "hc_light": "keyword.operator: #000000", - "light_modern": "keyword.operator: #000000" + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE", + "dark_modern": "variable: #9CDCFE", + "hc_light": "variable: #001080", + "light_modern": "variable: #001080" } }, { - "c": " ", + "c": " = ", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -3080,7 +3556,7 @@ } }, { - "c": " version ", + "c": " ", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -3094,21 +3570,21 @@ } }, { - "c": "=", - "t": "source.ruby keyword.operator.assignment.ruby", + "c": "version", + "t": "source.ruby variable.ruby", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4", - "dark_modern": "keyword.operator: #D4D4D4", - "hc_light": "keyword.operator: #000000", - "light_modern": "keyword.operator: #000000" + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE", + "dark_modern": "variable: #9CDCFE", + "hc_light": "variable: #001080", + "light_modern": "variable: #001080" } }, { - "c": " version", + "c": " = version", "t": "source.ruby", "r": { "dark_plus": "default: #D4D4D4", @@ -3137,7 +3613,7 @@ }, { "c": "/", - "t": "source.ruby string.regexp.classic.ruby punctuation.definition.string.ruby", + "t": "source.ruby string.regexp.interpolated.ruby punctuation.section.regexp.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3151,7 +3627,7 @@ }, { "c": "clang-", - "t": "source.ruby string.regexp.classic.ruby", + "t": "source.ruby string.regexp.interpolated.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3165,7 +3641,7 @@ }, { "c": "(", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby punctuation.definition.group.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby punctuation.definition.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3179,7 +3655,7 @@ }, { "c": "\\d", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby constant.character.escape.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby constant.character.escape.ruby", "r": { "dark_plus": "constant.character.escape: #D7BA7D", "light_plus": "constant.character.escape: #EE0000", @@ -3193,7 +3669,7 @@ }, { "c": "+", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3207,7 +3683,7 @@ }, { "c": "\\.\\d", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby constant.character.escape.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby constant.character.escape.ruby", "r": { "dark_plus": "constant.character.escape: #D7BA7D", "light_plus": "constant.character.escape: #EE0000", @@ -3221,7 +3697,7 @@ }, { "c": "+", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3235,7 +3711,7 @@ }, { "c": "\\.\\d", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby constant.character.escape.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby constant.character.escape.ruby", "r": { "dark_plus": "constant.character.escape: #D7BA7D", "light_plus": "constant.character.escape: #EE0000", @@ -3249,7 +3725,7 @@ }, { "c": "+", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3263,7 +3739,7 @@ }, { "c": "(", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby meta.group.regexp.ruby punctuation.definition.group.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby string.regexp.group.ruby punctuation.definition.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3277,7 +3753,7 @@ }, { "c": "\\.\\d", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby meta.group.regexp.ruby constant.character.escape.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby string.regexp.group.ruby constant.character.escape.ruby", "r": { "dark_plus": "constant.character.escape: #D7BA7D", "light_plus": "constant.character.escape: #EE0000", @@ -3291,7 +3767,7 @@ }, { "c": "+", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby meta.group.regexp.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby string.regexp.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3305,7 +3781,7 @@ }, { "c": ")", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby meta.group.regexp.ruby punctuation.definition.group.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby string.regexp.group.ruby punctuation.definition.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3319,7 +3795,7 @@ }, { "c": "?", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3333,7 +3809,7 @@ }, { "c": ")", - "t": "source.ruby string.regexp.classic.ruby meta.group.regexp.ruby punctuation.definition.group.ruby", + "t": "source.ruby string.regexp.interpolated.ruby string.regexp.group.ruby punctuation.definition.group.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3347,7 +3823,7 @@ }, { "c": "/", - "t": "source.ruby string.regexp.classic.ruby punctuation.definition.string.ruby", + "t": "source.ruby string.regexp.interpolated.ruby punctuation.section.regexp.ruby", "r": { "dark_plus": "string.regexp: #D16969", "light_plus": "string.regexp: #811F3F", @@ -3389,7 +3865,7 @@ }, { "c": "1", - "t": "source.ruby constant.numeric.integer.ruby", + "t": "source.ruby constant.numeric.ruby", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #098658", @@ -3459,7 +3935,7 @@ }, { "c": "\"", - "t": "source.ruby string.quoted.double.ruby punctuation.definition.string.begin.ruby", + "t": "source.ruby string.quoted.double.interpolated.ruby punctuation.definition.string.begin.ruby", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3473,7 +3949,7 @@ }, { "c": "0", - "t": "source.ruby string.quoted.double.ruby", + "t": "source.ruby string.quoted.double.interpolated.ruby", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -3487,7 +3963,7 @@ }, { "c": "\"", - "t": "source.ruby string.quoted.double.ruby punctuation.definition.string.end.ruby", + "t": "source.ruby string.quoted.double.interpolated.ruby punctuation.definition.string.end.ruby", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515",