ver 2009.10.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1404 -0
- data/MANIFEST +187 -0
- data/Rakefile +30 -0
- data/TODO +169 -0
- data/bin/ver +19 -0
- data/config/detect.rb +109 -0
- data/config/keymap/vim.rb +239 -0
- data/config/rc.rb +0 -0
- data/config/scratch +3 -0
- data/config/syntax/ANTLR.json +275 -0
- data/config/syntax/ASP VB.net.json +228 -0
- data/config/syntax/ASP.json +135 -0
- data/config/syntax/ActionScript.json +168 -0
- data/config/syntax/Ada.json +108 -0
- data/config/syntax/Apache.json +342 -0
- data/config/syntax/AppleScript.json +721 -0
- data/config/syntax/Bibtex.json +253 -0
- data/config/syntax/Blog (HTML).json +47 -0
- data/config/syntax/Blog (Markdown).json +50 -0
- data/config/syntax/Blog (Text).json +45 -0
- data/config/syntax/Blog (Textile).json +45 -0
- data/config/syntax/Bulletin Board.json +428 -0
- data/config/syntax/C++.json +323 -0
- data/config/syntax/C.json +694 -0
- data/config/syntax/CSS.json +346 -0
- data/config/syntax/DOT.json +79 -0
- data/config/syntax/Diff.json +136 -0
- data/config/syntax/Dylan.json +104 -0
- data/config/syntax/Eiffel.json +128 -0
- data/config/syntax/Erlang.json +1636 -0
- data/config/syntax/F-Script.json +137 -0
- data/config/syntax/FXScript.json +260 -0
- data/config/syntax/Gri.json +141 -0
- data/config/syntax/HTML (Mason).json +207 -0
- data/config/syntax/HTML (Rails).json +52 -0
- data/config/syntax/HTML (Tcl).json +42 -0
- data/config/syntax/HTML for ASP.net.json +736 -0
- data/config/syntax/HTML-ASP.json +45 -0
- data/config/syntax/HTML.json +614 -0
- data/config/syntax/Haskell.json +407 -0
- data/config/syntax/Inform.json +80 -0
- data/config/syntax/Ini.json +91 -0
- data/config/syntax/Io.json +142 -0
- data/config/syntax/Java.json +745 -0
- data/config/syntax/JavaProperties.json +42 -0
- data/config/syntax/JavaScript.json +446 -0
- data/config/syntax/LaTeX Beamer.json +65 -0
- data/config/syntax/LaTeX Log.json +88 -0
- data/config/syntax/LaTeX.json +962 -0
- data/config/syntax/Lighttpd.json +93 -0
- data/config/syntax/Lisp.json +101 -0
- data/config/syntax/Literate Haskell.json +55 -0
- data/config/syntax/Logtalk.json +289 -0
- data/config/syntax/Lua.json +146 -0
- data/config/syntax/M.json +744 -0
- data/config/syntax/MEL.json +161 -0
- data/config/syntax/MIPS.json +114 -0
- data/config/syntax/Mail.json +224 -0
- data/config/syntax/Makefile.json +66 -0
- data/config/syntax/Markdown.json +644 -0
- data/config/syntax/Modula-3.json +80 -0
- data/config/syntax/Movable Type.json +348 -0
- data/config/syntax/OCaml.json +1391 -0
- data/config/syntax/Objective-C++.json +21 -0
- data/config/syntax/OpenGL.json +24 -0
- data/config/syntax/PHP.json +2184 -0
- data/config/syntax/Pascal.json +128 -0
- data/config/syntax/Perl.json +2091 -0
- data/config/syntax/Plain text.json +49 -0
- data/config/syntax/Processing.json +188 -0
- data/config/syntax/Quake3 Config.json +54 -0
- data/config/syntax/R.json +157 -0
- data/config/syntax/Rez.json +137 -0
- data/config/syntax/Ruby on Rails.json +170 -0
- data/config/syntax/Ruby.json +1753 -0
- data/config/syntax/SQL (Rails).json +31 -0
- data/config/syntax/SQL.json +435 -0
- data/config/syntax/SWIG.json +96 -0
- data/config/syntax/Scheme.json +359 -0
- data/config/syntax/Shell-Unix-Generic.json +1198 -0
- data/config/syntax/Slate.json +265 -0
- data/config/syntax/Smarty.json +110 -0
- data/config/syntax/Standard ML.json +322 -0
- data/config/syntax/Subversion commit message.json +62 -0
- data/config/syntax/Tcl.json +278 -0
- data/config/syntax/TeX Math.json +83 -0
- data/config/syntax/TeX.json +157 -0
- data/config/syntax/Textile.json +273 -0
- data/config/syntax/Twiki.json +436 -0
- data/config/syntax/Vectorscript.json +97 -0
- data/config/syntax/XML strict.json +148 -0
- data/config/syntax/XML.json +301 -0
- data/config/syntax/XSL.json +96 -0
- data/config/syntax/YAML.json +293 -0
- data/config/syntax/iCalendar.json +51 -0
- data/config/syntax/reStructuredText.json +403 -0
- data/config/theme/Active4D.json +260 -0
- data/config/theme/All Hallow's Eve.json +171 -0
- data/config/theme/Amy.json +359 -0
- data/config/theme/BBEdit.json +269 -0
- data/config/theme/Bespin.json +322 -0
- data/config/theme/Blackboard.json +215 -0
- data/config/theme/BoysAndGirls01.json +156 -0
- data/config/theme/Brilliance Black.json +1695 -0
- data/config/theme/Brilliance Dull.json +1451 -0
- data/config/theme/Classic Modified.json +288 -0
- data/config/theme/Cobalt.json +345 -0
- data/config/theme/Cool Glow.json +215 -0
- data/config/theme/Dawn.json +258 -0
- data/config/theme/Eiffel.json +270 -0
- data/config/theme/Espresso Libre.json +247 -0
- data/config/theme/Fluidvision.json +272 -0
- data/config/theme/IDLE.json +159 -0
- data/config/theme/LAZY.json +178 -0
- data/config/theme/Mac Classic.json +277 -0
- data/config/theme/MagicWB (Amiga).json +231 -0
- data/config/theme/Merbivore Soft.json +181 -0
- data/config/theme/Merbivore.json +181 -0
- data/config/theme/Monokai.json +177 -0
- data/config/theme/Notepad2.json +166 -0
- data/config/theme/Pastels on Dark.json +437 -0
- data/config/theme/RubyBlue.json +226 -0
- data/config/theme/Sin City 2.json +361 -0
- data/config/theme/Slate.json +270 -0
- data/config/theme/Slush & Poppies.json +232 -0
- data/config/theme/SpaceCadet.json +143 -0
- data/config/theme/Sunburst.json +415 -0
- data/config/theme/Twilight BG FG.json +633 -0
- data/config/theme/Twilight.json +321 -0
- data/config/theme/Whys Poignant.json +119 -0
- data/config/theme/Zenburnesque.json +237 -0
- data/config/theme/barf.json +155 -0
- data/config/theme/fake.json +418 -0
- data/config/theme/happydeluxe.json +114 -0
- data/config/theme/iLife 05.json +393 -0
- data/config/theme/iPlastic.json +177 -0
- data/config/theme/mintBlue Dark.json +414 -0
- data/config/theme/mintBlue.json +415 -0
- data/config/theme/monoindustrial.json +276 -0
- data/config/theme/starlight.json +67 -0
- data/config/tutorial +74 -0
- data/config/welcome +115 -0
- data/help/index.verh +14 -0
- data/lib/ver.rb +156 -0
- data/lib/ver/entry.rb +97 -0
- data/lib/ver/keymap.rb +96 -0
- data/lib/ver/layout.rb +107 -0
- data/lib/ver/methods.rb +19 -0
- data/lib/ver/methods/completion.rb +116 -0
- data/lib/ver/methods/control.rb +340 -0
- data/lib/ver/methods/insert.rb +6 -0
- data/lib/ver/methods/move.rb +65 -0
- data/lib/ver/methods/search.rb +33 -0
- data/lib/ver/methods/select.rb +145 -0
- data/lib/ver/methods/views.rb +21 -0
- data/lib/ver/mode.rb +160 -0
- data/lib/ver/options.rb +207 -0
- data/lib/ver/plist.rb +106 -0
- data/lib/ver/status.rb +67 -0
- data/lib/ver/syntax.rb +68 -0
- data/lib/ver/syntax/detector.rb +53 -0
- data/lib/ver/syntax/processor.rb +48 -0
- data/lib/ver/text.rb +374 -0
- data/lib/ver/textpow.rb +357 -0
- data/lib/ver/theme.rb +162 -0
- data/lib/ver/vendor/fuzzy_file_finder.rb +340 -0
- data/lib/ver/view.rb +163 -0
- data/lib/ver/view/entry.rb +28 -0
- data/lib/ver/view/list.rb +137 -0
- data/lib/ver/view/list/buffer.rb +27 -0
- data/lib/ver/view/list/fuzzy_file_finder.rb +44 -0
- data/lib/ver/view/list/syntax.rb +13 -0
- data/lib/ver/view/list/theme.rb +13 -0
- data/spec/keymap.rb +224 -0
- data/tasks/bacon.rake +49 -0
- data/tasks/changelog.rake +18 -0
- data/tasks/gem.rake +22 -0
- data/tasks/gem_installer.rake +76 -0
- data/tasks/grancher.rake +12 -0
- data/tasks/install_dependencies.rake +6 -0
- data/tasks/manifest.rake +4 -0
- data/tasks/plist2json.rake +35 -0
- data/tasks/rcov.rake +18 -0
- data/tasks/release.rake +12 -0
- data/tasks/reversion.rake +8 -0
- data/tasks/syntax_list.rake +31 -0
- data/ver.gemspec +29 -0
- metadata +241 -0
@@ -0,0 +1,137 @@
|
|
1
|
+
{
|
2
|
+
"comment": "Rez. Legacy Mac OS source code frequently contains Rez files. \u2013 chris@cjack.com",
|
3
|
+
"fileTypes": [
|
4
|
+
"r"
|
5
|
+
],
|
6
|
+
"foldingStartMarker": "(\/\\*\\*|\\{\\s*$)",
|
7
|
+
"foldingStopMarker": "(\\*\\*\/|^\\s*\\})",
|
8
|
+
"keyEquivalent": "^~R",
|
9
|
+
"name": "Rez",
|
10
|
+
"patterns": [
|
11
|
+
{
|
12
|
+
"begin": "\/\\*",
|
13
|
+
"captures": {
|
14
|
+
"0": {
|
15
|
+
"name": "punctuation.definition.comment.rez"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"end": "\\*\/",
|
19
|
+
"name": "comment.block.rez"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"captures": {
|
23
|
+
"1": {
|
24
|
+
"name": "punctuation.definition.comment.rez"
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"match": "(\/\/).*$\\n?",
|
28
|
+
"name": "comment.line.double-slash.rez"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"comment": "Note that Xcode gets case sensitivity wrong (last checked Xcode 2.0). I'm not sure built-in functions are case-insensitive, though, so we might too.",
|
32
|
+
"match": "\\b(?i:(change|data|delete|include|read|resource|type))\\b",
|
33
|
+
"name": "keyword.control.rez"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"match": "\\b(?i:(align|array|binary|bit|bitstring|boolean|byte|case|char|cstring|decimal|enum|fill|hex|integer|key|literal|long|longint|nibble|octal|point|pstring|rect|string|switch|unsigned|wide|word|wstring))\\b",
|
37
|
+
"name": "storage.type.rez"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"match": "\\b(?i:(appheap|locked|nonpurgeable|purgeable|sysheap|unlocked))\\b",
|
41
|
+
"name": "keyword.other.attributes.rez"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"captures": {
|
45
|
+
"1": {
|
46
|
+
"name": "punctuation.definition.function.rez"
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"match": "(\\$\\$)(?i:(ArrayIndex|Attributes|BitField|Byte|CountOf|Date|Day|Format|Hour|ID|Long|Minute|Month|Name|PackedSize|Read|Resource|ResourceSize|Second|Shell|Time|Type|Version|Weekday|Word|Year))",
|
50
|
+
"name": "support.function.built-in.rez"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"match": "\\b(((0(x|X|B)|\\$)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b",
|
54
|
+
"name": "constant.numeric.rez"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"begin": "\"",
|
58
|
+
"beginCaptures": {
|
59
|
+
"0": {
|
60
|
+
"name": "punctuation.definition.string.begin.rez"
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"end": "\"",
|
64
|
+
"endCaptures": {
|
65
|
+
"0": {
|
66
|
+
"name": "punctuation.definition.string.end.rez"
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"name": "string.quoted.double.rez",
|
70
|
+
"patterns": [
|
71
|
+
{
|
72
|
+
"include": "#escaped_char"
|
73
|
+
}
|
74
|
+
]
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"begin": "'",
|
78
|
+
"beginCaptures": {
|
79
|
+
"0": {
|
80
|
+
"name": "punctuation.definition.string.begin.rez"
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"end": "'",
|
84
|
+
"endCaptures": {
|
85
|
+
"0": {
|
86
|
+
"name": "punctuation.definition.string.end.rez"
|
87
|
+
}
|
88
|
+
},
|
89
|
+
"name": "string.quoted.single.rez",
|
90
|
+
"patterns": [
|
91
|
+
{
|
92
|
+
"include": "#escaped_char"
|
93
|
+
}
|
94
|
+
]
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"begin": "\\$\"",
|
98
|
+
"beginCaptures": {
|
99
|
+
"0": {
|
100
|
+
"name": "punctuation.definition.string.begin.rez"
|
101
|
+
}
|
102
|
+
},
|
103
|
+
"end": "\"",
|
104
|
+
"endCaptures": {
|
105
|
+
"0": {
|
106
|
+
"name": "punctuation.definition.string.end.rez"
|
107
|
+
}
|
108
|
+
},
|
109
|
+
"name": "string.quoted.other.hex.rez",
|
110
|
+
"patterns": [
|
111
|
+
{
|
112
|
+
"include": "#escaped_char"
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"captures": {
|
118
|
+
"1": {
|
119
|
+
"name": "punctuation.definition.preprocessor.rez"
|
120
|
+
},
|
121
|
+
"2": {
|
122
|
+
"name": "keyword.control.import.rez"
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"match": "^\\s*(#)\\s*(define|defined|else|elif|endif|if|ifdef|ifndef|include|line|printf|undef)\\b",
|
126
|
+
"name": "meta.preprocessor.rez"
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"repository": {
|
130
|
+
"escaped_char": {
|
131
|
+
"match": "\\\\.",
|
132
|
+
"name": "constant.character.escape.rez"
|
133
|
+
}
|
134
|
+
},
|
135
|
+
"scopeName": "source.rez",
|
136
|
+
"uuid": "F3EB29E9-8DB7-4052-9D48-5CDD2491D8D3"
|
137
|
+
}
|
@@ -0,0 +1,170 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"rb",
|
4
|
+
"rxml",
|
5
|
+
"builder"
|
6
|
+
],
|
7
|
+
"foldingStartMarker": "(?x)^\n\t (\\s*+\n\t (module|class|def\n\t |unless|if\n\t |case\n\t |begin\n\t |for|while|until\n\t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\t | '(\\\\.|[^'])*+' # eat a single quoted string\n\t | [^#\"'] # eat all but comments and strings\n\t )*\n\t ( \\s (do|begin|case)\n\t | [-+=&|*\/~%^<>~] \\s*+ (if|unless)\n\t )\n\t )\\b\n\t (?! [^;]*+ ; .*? \\bend\\b )\n\t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\t | '(\\\\.|[^'])*+' # eat a single quoted string\n\t | [^#\"'] # eat all but comments and strings\n\t )*\n\t ( \\{ (?! [^}]*+ \\} )\n\t | \\[ (?! [^\\]]*+ \\] )\n\t )\n\t ).*$\n\t| [#] .*? \\(fold\\) \\s*+ $ # Sune\u2019s special marker\n\t",
|
8
|
+
"foldingStopMarker": "(?x)\n\t\t( (^|;) \\s*+ end \\s*+ ([#].*)? $\n\t\t| ^ \\s*+ [}\\]] \\s*+ ([#].*)? $\n\t\t| [#] .*? \\(end\\) \\s*+ $ # Sune\u2019s special marker\n\t\t)",
|
9
|
+
"keyEquivalent": "^~R",
|
10
|
+
"name": "Ruby on Rails",
|
11
|
+
"patterns": [
|
12
|
+
{
|
13
|
+
"begin": "(^\\s*)(?=class\\s+(([.a-zA-Z0-9_:]+ControllerTest(\\s*<\\s*[.a-zA-Z0-9_:]+)?)))",
|
14
|
+
"comment": "Uses lookahead to match classes with the ControllerTest suffix; includes 'source.ruby' to avoid infinite recursion",
|
15
|
+
"end": "^\\1(?=end)\\b",
|
16
|
+
"name": "meta.rails.functional_test",
|
17
|
+
"patterns": [
|
18
|
+
{
|
19
|
+
"include": "source.ruby"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"include": "$self"
|
23
|
+
}
|
24
|
+
]
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"begin": "(^\\s*)(?=class\\s+(([.a-zA-Z0-9_:]+Controller\\b(\\s*<\\s*[.a-zA-Z0-9_:]+)?)|(<<\\s*[.a-zA-Z0-9_:]+)))(?!.+\\bend\\b)",
|
28
|
+
"comment": "Uses lookahead to match classes with the Controller suffix; includes 'source.ruby' to avoid infinite recursion",
|
29
|
+
"end": "^\\1(?=end)\\b",
|
30
|
+
"name": "meta.rails.controller",
|
31
|
+
"patterns": [
|
32
|
+
{
|
33
|
+
"include": "source.ruby"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"include": "$self"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"begin": "(^\\s*)(?=module\\s+((([A-Z]\\w*::)*)[A-Z]\\w*)Helper)",
|
42
|
+
"comment": "Uses lookahead to match modules with the Helper suffix; includes 'source.ruby' to avoid infinite recursion",
|
43
|
+
"end": "^\\1(?=end)\\b",
|
44
|
+
"name": "meta.rails.helper",
|
45
|
+
"patterns": [
|
46
|
+
{
|
47
|
+
"include": "source.ruby"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"include": "$self"
|
51
|
+
}
|
52
|
+
]
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"begin": "(^\\s*)(?=class\\s+(([.a-zA-Z0-9_:]+(\\s*<\\s*ActionMailer::Base))))",
|
56
|
+
"comment": "Uses lookahead to match classes that inherit from ActionMailer::Base; includes 'source.ruby' to avoid infinite recursion",
|
57
|
+
"end": "^\\1(?=end)\\b",
|
58
|
+
"name": "meta.rails.mailer",
|
59
|
+
"patterns": [
|
60
|
+
{
|
61
|
+
"include": "source.ruby"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"include": "$self"
|
65
|
+
}
|
66
|
+
]
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"begin": "(^\\s*)(?=class\\s+.+ActiveRecord::Base)",
|
70
|
+
"comment": "Uses lookahead to match classes that (may) inherit from ActiveRecord::Base; includes 'source.ruby' to avoid infinite recursion",
|
71
|
+
"end": "^\\1(?=end)\\b",
|
72
|
+
"name": "meta.rails.model",
|
73
|
+
"patterns": [
|
74
|
+
{
|
75
|
+
"include": "source.ruby"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"include": "$self"
|
79
|
+
}
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"begin": "(^\\s*)(?=class\\s+.+ActiveRecord::Migration)",
|
84
|
+
"comment": "Uses lookahead to match classes that (may) inherit from ActiveRecord::Migration; includes 'source.ruby' to avoid infinite recursion",
|
85
|
+
"end": "^\\1(?=end)\\b",
|
86
|
+
"name": "meta.rails.migration",
|
87
|
+
"patterns": [
|
88
|
+
{
|
89
|
+
"begin": "(^\\s*)(?=change_table)\\b",
|
90
|
+
"comment": "Uses lookahead to match methods change_table; includes 'source.ruby' to avoid infinite recursion",
|
91
|
+
"contentName": "meta.rails.migration.change_table",
|
92
|
+
"end": "^\\1(?=end)\\b",
|
93
|
+
"patterns": [
|
94
|
+
{
|
95
|
+
"include": "source.ruby"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"include": "$self"
|
99
|
+
}
|
100
|
+
]
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"begin": "(^\\s*)(?=create_table)\\b",
|
104
|
+
"comment": "Uses lookahead to match methods create_table; includes 'source.ruby' to avoid infinite recursion",
|
105
|
+
"contentName": "meta.rails.migration.create_table",
|
106
|
+
"end": "^\\1(?=end)\\b",
|
107
|
+
"patterns": [
|
108
|
+
{
|
109
|
+
"include": "source.ruby"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"include": "$self"
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"include": "source.ruby"
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"include": "$self"
|
121
|
+
}
|
122
|
+
]
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"begin": "(^\\s*)(?=class\\s+(?![.a-zA-Z0-9_:]+ControllerTest)(([.a-zA-Z0-9_:]+Test(\\s*<\\s*[.a-zA-Z0-9_:]+)?)|(<<\\s*[.a-zA-Z0-9_:]+)))",
|
126
|
+
"comment": "Uses lookahead to match classes with the Test suffix; includes 'source.ruby' to avoid infinite recursion",
|
127
|
+
"end": "^\\1(?=end)\\b",
|
128
|
+
"name": "meta.rails.unit_test",
|
129
|
+
"patterns": [
|
130
|
+
{
|
131
|
+
"include": "source.ruby"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"include": "$self"
|
135
|
+
}
|
136
|
+
]
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"begin": "(^\\s*)ActionController::Routing::Routes",
|
140
|
+
"comment": "Uses ActionController::Routing::Routes to determine it is a routes file; includes 'source.ruby' to avoid infinite recursion",
|
141
|
+
"end": "^\\1(?=end)\\b",
|
142
|
+
"name": "meta.rails.routes",
|
143
|
+
"patterns": [
|
144
|
+
{
|
145
|
+
"include": "source.ruby"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"include": "$self"
|
149
|
+
}
|
150
|
+
]
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"match": "\\b(before_filter|skip_before_filter|skip_after_filter|after_filter|around_filter|filter|filter_parameter_logging|layout|require_dependency|render|render_action|render_text|render_file|render_template|render_nothing|render_component|render_without_layout|rescue_from|url_for|redirect_to|redirect_to_path|redirect_to_url|respond_to|helper|helper_method|model|service|observer|serialize|scaffold|verify|hide_action)\\b",
|
154
|
+
"name": "support.function.actionpack.rails"
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"match": "\\b(named_scope|after_create|after_destroy|after_save|after_update|after_validation|after_validation_on_create|after_validation_on_update|before_create|before_destroy|before_save|before_update|before_validation|before_validation_on_create|before_validation_on_update|composed_of|belongs_to|has_one|has_many|has_and_belongs_to_many|validate|validate_on_create|validates_numericality_of|validate_on_update|validates_acceptance_of|validates_associated|validates_confirmation_of|validates_each|validates_format_of|validates_inclusion_of|validates_exclusion_of|validates_length_of|validates_presence_of|validates_size_of|validates_uniqueness_of|attr_protected|attr_accessible|attr_readonly)\\b",
|
158
|
+
"name": "support.function.activerecord.rails"
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"match": "\\b(alias_method_chain|alias_attribute|delegate|cattr_accessor|mattr_accessor|returning)\\b",
|
162
|
+
"name": "support.function.activesupport.rails"
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"include": "source.ruby"
|
166
|
+
}
|
167
|
+
],
|
168
|
+
"scopeName": "source.ruby.rails",
|
169
|
+
"uuid": "54D6E91E-8F31-11D9-90C5-0011242E4184"
|
170
|
+
}
|
@@ -0,0 +1,1753 @@
|
|
1
|
+
{
|
2
|
+
"comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p << end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t\u2022 Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t\u2022 Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE' \n\tThis is single quoted. \n\tThe above used #{Time.now} \n\tTHERE \n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\t\n\ttext:\n\t\"a\\332a\"\n\tsymptoms:\n\t'\\332' is not recognized as slash3.. which should be octal 332.\n\tsolution:\n\tplain regexp.. should be easy.\n\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n",
|
3
|
+
"fileTypes": [
|
4
|
+
"rb",
|
5
|
+
"rbx",
|
6
|
+
"rjs",
|
7
|
+
"Rakefile",
|
8
|
+
"rake",
|
9
|
+
"cgi",
|
10
|
+
"fcgi",
|
11
|
+
"gemspec",
|
12
|
+
"irbrc",
|
13
|
+
"capfile"
|
14
|
+
],
|
15
|
+
"firstLineMatch": "^#!\/.*\\bruby\\b",
|
16
|
+
"foldingStartMarker": "(?x)^\n\t (\\s*+\n\t (module|class|def(?!.*\\bend\\s*$)\n\t |unless|if\n\t |case\n\t |begin\n\t |for|while|until\n\t |^=begin\n\t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\t | '(\\\\.|[^'])*+' # eat a single quoted string\n\t | [^#\"'] # eat all but comments and strings\n\t )*\n\t ( \\s (do|begin|case)\n\t | (?<!\\$)[-+=&|*\/~%^<>~] \\s*+ (if|unless)\n\t )\n\t )\\b\n\t (?! [^;]*+ ; .*? \\bend\\b )\n\t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\t | '(\\\\.|[^'])*+' # eat a single quoted string\n\t | [^#\"'] # eat all but comments and strings\n\t )*\n\t ( \\{ (?! [^}]*+ \\} )\n\t | \\[ (?! [^\\]]*+ \\] )\n\t )\n\t ).*$\n\t| [#] .*? \\(fold\\) \\s*+ $ # Sune\u2019s special marker\n\t",
|
17
|
+
"foldingStopMarker": "(?x)\n\t\t( (^|;) \\s*+ end \\s*+ ([#].*)? $\n\t\t| (^|;) \\s*+ end \\. .* $\n\t\t| ^ \\s*+ [}\\]] ,? \\s*+ ([#].*)? $\n\t\t| [#] .*? \\(end\\) \\s*+ $ # Sune\u2019s special marker\n\t\t| ^=end\n\t\t)",
|
18
|
+
"keyEquivalent": "^~R",
|
19
|
+
"name": "Ruby",
|
20
|
+
"patterns": [
|
21
|
+
{
|
22
|
+
"captures": {
|
23
|
+
"1": {
|
24
|
+
"name": "keyword.control.class.ruby"
|
25
|
+
},
|
26
|
+
"2": {
|
27
|
+
"name": "entity.name.type.class.ruby"
|
28
|
+
},
|
29
|
+
"4": {
|
30
|
+
"name": "entity.other.inherited-class.ruby"
|
31
|
+
},
|
32
|
+
"5": {
|
33
|
+
"name": "punctuation.separator.inheritance.ruby"
|
34
|
+
},
|
35
|
+
"6": {
|
36
|
+
"name": "variable.other.object.ruby"
|
37
|
+
},
|
38
|
+
"7": {
|
39
|
+
"name": "punctuation.definition.variable.ruby"
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"match": "^\\s*(class)\\s+(([.a-zA-Z0-9_:]+(\\s*(<)\\s*[.a-zA-Z0-9_:]+)?)|((<<)\\s*[.a-zA-Z0-9_:]+))",
|
43
|
+
"name": "meta.class.ruby"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"captures": {
|
47
|
+
"1": {
|
48
|
+
"name": "keyword.control.module.ruby"
|
49
|
+
},
|
50
|
+
"2": {
|
51
|
+
"name": "entity.name.type.module.ruby"
|
52
|
+
},
|
53
|
+
"3": {
|
54
|
+
"name": "entity.other.inherited-class.module.first.ruby"
|
55
|
+
},
|
56
|
+
"4": {
|
57
|
+
"name": "punctuation.separator.inheritance.ruby"
|
58
|
+
},
|
59
|
+
"5": {
|
60
|
+
"name": "entity.other.inherited-class.module.second.ruby"
|
61
|
+
},
|
62
|
+
"6": {
|
63
|
+
"name": "punctuation.separator.inheritance.ruby"
|
64
|
+
},
|
65
|
+
"7": {
|
66
|
+
"name": "entity.other.inherited-class.module.third.ruby"
|
67
|
+
},
|
68
|
+
"8": {
|
69
|
+
"name": "punctuation.separator.inheritance.ruby"
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"match": "^\\s*(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)",
|
73
|
+
"name": "meta.module.ruby"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"comment": "else if is a common mistake carried over from other languages. it works if you put in a second end, but it\u2019s never what you want.",
|
77
|
+
"match": "(?<!\\.)\\belse(\\s)+if\\b",
|
78
|
+
"name": "invalid.deprecated.ruby"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"comment": "everything being a reserved word, not a value and needing a 'end' is a..",
|
82
|
+
"match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\\b(?![?!])",
|
83
|
+
"name": "keyword.control.ruby"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"comment": "contextual smart pair support for block parameters",
|
87
|
+
"match": "(?<!\\.)\\bdo\\b\\s*",
|
88
|
+
"name": "keyword.control.start-block.ruby"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"comment": "contextual smart pair support",
|
92
|
+
"match": "(?<=\\{)(\\s+)",
|
93
|
+
"name": "meta.syntax.ruby.start-block"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"comment": " as above, just doesn't need a 'end' and does a logic operation",
|
97
|
+
"match": "(?<!\\.)\\b(and|not|or)\\b",
|
98
|
+
"name": "keyword.operator.logical.ruby"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"comment": " just as above but being not a logical operation",
|
102
|
+
"match": "(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\\b(?![?!])|\\bdefined\\?|\\bblock_given\\?",
|
103
|
+
"name": "keyword.control.pseudo-method.ruby"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"match": "\\b(nil|true|false)\\b(?![?!])",
|
107
|
+
"name": "constant.language.ruby"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"match": "\\b(__(FILE|LINE)__|self)\\b(?![?!])",
|
111
|
+
"name": "variable.language.ruby"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"comment": " everything being a method but having a special function is a..",
|
115
|
+
"match": "\\b(initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\\b(?![?!])",
|
116
|
+
"name": "keyword.other.special-method.ruby"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"begin": "\\b(require|gem)\\b",
|
120
|
+
"captures": {
|
121
|
+
"1": {
|
122
|
+
"name": "keyword.other.special-method.ruby"
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"end": "$|(?=#)",
|
126
|
+
"name": "meta.require.ruby",
|
127
|
+
"patterns": [
|
128
|
+
{
|
129
|
+
"include": "$self"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"captures": {
|
135
|
+
"1": {
|
136
|
+
"name": "punctuation.definition.variable.ruby"
|
137
|
+
}
|
138
|
+
},
|
139
|
+
"match": "(@)[a-zA-Z_]\\w*",
|
140
|
+
"name": "variable.other.readwrite.instance.ruby"
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"captures": {
|
144
|
+
"1": {
|
145
|
+
"name": "punctuation.definition.variable.ruby"
|
146
|
+
}
|
147
|
+
},
|
148
|
+
"match": "(@@)[a-zA-Z_]\\w*",
|
149
|
+
"name": "variable.other.readwrite.class.ruby"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"captures": {
|
153
|
+
"1": {
|
154
|
+
"name": "punctuation.definition.variable.ruby"
|
155
|
+
}
|
156
|
+
},
|
157
|
+
"match": "(\\$)[a-zA-Z_]\\w*",
|
158
|
+
"name": "variable.other.readwrite.global.ruby"
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"captures": {
|
162
|
+
"1": {
|
163
|
+
"name": "punctuation.definition.variable.ruby"
|
164
|
+
}
|
165
|
+
},
|
166
|
+
"match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|\/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])",
|
167
|
+
"name": "variable.other.readwrite.global.pre-defined.ruby"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"begin": "\\b(ENV)\\[",
|
171
|
+
"beginCaptures": {
|
172
|
+
"1": {
|
173
|
+
"name": "variable.other.constant.ruby"
|
174
|
+
}
|
175
|
+
},
|
176
|
+
"end": "\\]",
|
177
|
+
"name": "meta.environment-variable.ruby",
|
178
|
+
"patterns": [
|
179
|
+
{
|
180
|
+
"include": "$self"
|
181
|
+
}
|
182
|
+
]
|
183
|
+
},
|
184
|
+
{
|
185
|
+
"match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))",
|
186
|
+
"name": "support.class.ruby"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"match": "\\b[A-Z]\\w*\\b",
|
190
|
+
"name": "variable.other.constant.ruby"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"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 |===?|>[>=]?|<=>|<[<=]?|[%&`\/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # \u2026or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ",
|
194
|
+
"beginCaptures": {
|
195
|
+
"1": {
|
196
|
+
"name": "keyword.control.def.ruby"
|
197
|
+
},
|
198
|
+
"2": {
|
199
|
+
"name": "entity.name.function.ruby"
|
200
|
+
},
|
201
|
+
"3": {
|
202
|
+
"name": "punctuation.definition.parameters.ruby"
|
203
|
+
}
|
204
|
+
},
|
205
|
+
"comment": "the method pattern comes from the symbol pattern, see there for a explaination",
|
206
|
+
"contentName": "variable.parameter.function.ruby",
|
207
|
+
"end": "\\)",
|
208
|
+
"endCaptures": {
|
209
|
+
"0": {
|
210
|
+
"name": "punctuation.definition.parameters.ruby"
|
211
|
+
}
|
212
|
+
},
|
213
|
+
"name": "meta.function.method.with-arguments.ruby",
|
214
|
+
"patterns": [
|
215
|
+
{
|
216
|
+
"include": "$self"
|
217
|
+
}
|
218
|
+
]
|
219
|
+
},
|
220
|
+
{
|
221
|
+
"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 |===?|>[>=]?|<=>|<[<=]?|[%&`\/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # \u2026or 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 ",
|
222
|
+
"beginCaptures": {
|
223
|
+
"1": {
|
224
|
+
"name": "keyword.control.def.ruby"
|
225
|
+
},
|
226
|
+
"2": {
|
227
|
+
"name": "entity.name.function.ruby"
|
228
|
+
}
|
229
|
+
},
|
230
|
+
"comment": "same as the previous rule, but without parentheses around the arguments",
|
231
|
+
"contentName": "variable.parameter.function.ruby",
|
232
|
+
"end": "$",
|
233
|
+
"name": "meta.function.method.with-arguments.ruby",
|
234
|
+
"patterns": [
|
235
|
+
{
|
236
|
+
"include": "$self"
|
237
|
+
}
|
238
|
+
]
|
239
|
+
},
|
240
|
+
{
|
241
|
+
"captures": {
|
242
|
+
"1": {
|
243
|
+
"name": "keyword.control.def.ruby"
|
244
|
+
},
|
245
|
+
"3": {
|
246
|
+
"name": "entity.name.function.ruby"
|
247
|
+
}
|
248
|
+
},
|
249
|
+
"comment": " the optional name is just to catch the def also without a method-name",
|
250
|
+
"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\u2026\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 |===?|>[>=]?|<=>|<[<=]?|[%&`\/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # \u2026or an operator method\n\t\t\t ",
|
251
|
+
"name": "meta.function.method.without-arguments.ruby"
|
252
|
+
},
|
253
|
+
{
|
254
|
+
"match": "\\b(0[xX]\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0[bB][01]+)\\b",
|
255
|
+
"name": "constant.numeric.ruby"
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"begin": ":'",
|
259
|
+
"captures": {
|
260
|
+
"0": {
|
261
|
+
"name": "punctuation.definition.constant.ruby"
|
262
|
+
}
|
263
|
+
},
|
264
|
+
"end": "'",
|
265
|
+
"name": "constant.other.symbol.single-quoted.ruby",
|
266
|
+
"patterns": [
|
267
|
+
{
|
268
|
+
"match": "\\\\['\\\\]",
|
269
|
+
"name": "constant.character.escape.ruby"
|
270
|
+
}
|
271
|
+
]
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"begin": ":\"",
|
275
|
+
"captures": {
|
276
|
+
"0": {
|
277
|
+
"name": "punctuation.definition.constant.ruby"
|
278
|
+
}
|
279
|
+
},
|
280
|
+
"end": "\"",
|
281
|
+
"name": "constant.other.symbol.double-quoted.ruby",
|
282
|
+
"patterns": [
|
283
|
+
{
|
284
|
+
"include": "#interpolated_ruby"
|
285
|
+
},
|
286
|
+
{
|
287
|
+
"include": "#escaped_char"
|
288
|
+
}
|
289
|
+
]
|
290
|
+
},
|
291
|
+
{
|
292
|
+
"comment": "Needs higher precidence than regular expressions.",
|
293
|
+
"match": "\/=",
|
294
|
+
"name": "keyword.operator.assignment.augmented.ruby"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"begin": "'",
|
298
|
+
"beginCaptures": {
|
299
|
+
"0": {
|
300
|
+
"name": "punctuation.definition.string.begin.ruby"
|
301
|
+
}
|
302
|
+
},
|
303
|
+
"comment": "single quoted string (does not allow interpolation)",
|
304
|
+
"end": "'",
|
305
|
+
"endCaptures": {
|
306
|
+
"0": {
|
307
|
+
"name": "punctuation.definition.string.end.ruby"
|
308
|
+
}
|
309
|
+
},
|
310
|
+
"name": "string.quoted.single.ruby",
|
311
|
+
"patterns": [
|
312
|
+
{
|
313
|
+
"match": "\\\\'|\\\\\\\\",
|
314
|
+
"name": "constant.character.escape.ruby"
|
315
|
+
}
|
316
|
+
]
|
317
|
+
},
|
318
|
+
{
|
319
|
+
"begin": "\"",
|
320
|
+
"beginCaptures": {
|
321
|
+
"0": {
|
322
|
+
"name": "punctuation.definition.string.begin.ruby"
|
323
|
+
}
|
324
|
+
},
|
325
|
+
"comment": "double quoted string (allows for interpolation)",
|
326
|
+
"end": "\"",
|
327
|
+
"endCaptures": {
|
328
|
+
"0": {
|
329
|
+
"name": "punctuation.definition.string.end.ruby"
|
330
|
+
}
|
331
|
+
},
|
332
|
+
"name": "string.quoted.double.ruby",
|
333
|
+
"patterns": [
|
334
|
+
{
|
335
|
+
"include": "#interpolated_ruby"
|
336
|
+
},
|
337
|
+
{
|
338
|
+
"include": "#escaped_char"
|
339
|
+
}
|
340
|
+
]
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"begin": "`",
|
344
|
+
"beginCaptures": {
|
345
|
+
"0": {
|
346
|
+
"name": "punctuation.definition.string.begin.ruby"
|
347
|
+
}
|
348
|
+
},
|
349
|
+
"comment": "execute string (allows for interpolation)",
|
350
|
+
"end": "`",
|
351
|
+
"endCaptures": {
|
352
|
+
"0": {
|
353
|
+
"name": "punctuation.definition.string.end.ruby"
|
354
|
+
}
|
355
|
+
},
|
356
|
+
"name": "string.interpolated.ruby",
|
357
|
+
"patterns": [
|
358
|
+
{
|
359
|
+
"include": "#interpolated_ruby"
|
360
|
+
},
|
361
|
+
{
|
362
|
+
"include": "#escaped_char"
|
363
|
+
}
|
364
|
+
]
|
365
|
+
},
|
366
|
+
{
|
367
|
+
"begin": "%x\\{",
|
368
|
+
"beginCaptures": {
|
369
|
+
"0": {
|
370
|
+
"name": "punctuation.definition.string.begin.ruby"
|
371
|
+
}
|
372
|
+
},
|
373
|
+
"comment": "execute string (allow for interpolation)",
|
374
|
+
"end": "\\}",
|
375
|
+
"endCaptures": {
|
376
|
+
"0": {
|
377
|
+
"name": "punctuation.definition.string.end.ruby"
|
378
|
+
}
|
379
|
+
},
|
380
|
+
"name": "string.interpolated.ruby",
|
381
|
+
"patterns": [
|
382
|
+
{
|
383
|
+
"include": "#interpolated_ruby"
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"include": "#escaped_char"
|
387
|
+
},
|
388
|
+
{
|
389
|
+
"include": "#nest_curly_i"
|
390
|
+
}
|
391
|
+
]
|
392
|
+
},
|
393
|
+
{
|
394
|
+
"begin": "%x\\[",
|
395
|
+
"beginCaptures": {
|
396
|
+
"0": {
|
397
|
+
"name": "punctuation.definition.string.begin.ruby"
|
398
|
+
}
|
399
|
+
},
|
400
|
+
"comment": "execute string (allow for interpolation)",
|
401
|
+
"end": "\\]",
|
402
|
+
"endCaptures": {
|
403
|
+
"0": {
|
404
|
+
"name": "punctuation.definition.string.end.ruby"
|
405
|
+
}
|
406
|
+
},
|
407
|
+
"name": "string.interpolated.ruby",
|
408
|
+
"patterns": [
|
409
|
+
{
|
410
|
+
"include": "#interpolated_ruby"
|
411
|
+
},
|
412
|
+
{
|
413
|
+
"include": "#escaped_char"
|
414
|
+
},
|
415
|
+
{
|
416
|
+
"include": "#nest_brackets_i"
|
417
|
+
}
|
418
|
+
]
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"begin": "%x\\<",
|
422
|
+
"beginCaptures": {
|
423
|
+
"0": {
|
424
|
+
"name": "punctuation.definition.string.begin.ruby"
|
425
|
+
}
|
426
|
+
},
|
427
|
+
"comment": "execute string (allow for interpolation)",
|
428
|
+
"end": "\\>",
|
429
|
+
"endCaptures": {
|
430
|
+
"0": {
|
431
|
+
"name": "punctuation.definition.string.end.ruby"
|
432
|
+
}
|
433
|
+
},
|
434
|
+
"name": "string.interpolated.ruby",
|
435
|
+
"patterns": [
|
436
|
+
{
|
437
|
+
"include": "#interpolated_ruby"
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"include": "#escaped_char"
|
441
|
+
},
|
442
|
+
{
|
443
|
+
"include": "#nest_ltgt_i"
|
444
|
+
}
|
445
|
+
]
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"begin": "%x\\(",
|
449
|
+
"beginCaptures": {
|
450
|
+
"0": {
|
451
|
+
"name": "punctuation.definition.string.begin.ruby"
|
452
|
+
}
|
453
|
+
},
|
454
|
+
"comment": "execute string (allow for interpolation)",
|
455
|
+
"end": "\\)",
|
456
|
+
"endCaptures": {
|
457
|
+
"0": {
|
458
|
+
"name": "punctuation.definition.string.end.ruby"
|
459
|
+
}
|
460
|
+
},
|
461
|
+
"name": "string.interpolated.ruby",
|
462
|
+
"patterns": [
|
463
|
+
{
|
464
|
+
"include": "#interpolated_ruby"
|
465
|
+
},
|
466
|
+
{
|
467
|
+
"include": "#escaped_char"
|
468
|
+
},
|
469
|
+
{
|
470
|
+
"include": "#nest_parens_i"
|
471
|
+
}
|
472
|
+
]
|
473
|
+
},
|
474
|
+
{
|
475
|
+
"begin": "%x([^\\w])",
|
476
|
+
"beginCaptures": {
|
477
|
+
"0": {
|
478
|
+
"name": "punctuation.definition.string.begin.ruby"
|
479
|
+
}
|
480
|
+
},
|
481
|
+
"comment": "execute string (allow for interpolation)",
|
482
|
+
"end": "\\1",
|
483
|
+
"endCaptures": {
|
484
|
+
"0": {
|
485
|
+
"name": "punctuation.definition.string.end.ruby"
|
486
|
+
}
|
487
|
+
},
|
488
|
+
"name": "string.interpolated.ruby",
|
489
|
+
"patterns": [
|
490
|
+
{
|
491
|
+
"include": "#interpolated_ruby"
|
492
|
+
},
|
493
|
+
{
|
494
|
+
"include": "#escaped_char"
|
495
|
+
}
|
496
|
+
]
|
497
|
+
},
|
498
|
+
{
|
499
|
+
"begin": "(?x)\n\t\t\t (?:\n\t\t\t ^ # beginning of line\n\t\t\t | (?<= # or look-behind on:\n\t\t\t [=>~(?:\\[,|&;]\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",
|
500
|
+
"captures": {
|
501
|
+
"1": {
|
502
|
+
"name": "string.regexp.classic.ruby"
|
503
|
+
},
|
504
|
+
"2": {
|
505
|
+
"name": "punctuation.definition.string.ruby"
|
506
|
+
}
|
507
|
+
},
|
508
|
+
"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",
|
509
|
+
"contentName": "string.regexp.classic.ruby",
|
510
|
+
"end": "((\/[eimnosux]*))",
|
511
|
+
"patterns": [
|
512
|
+
{
|
513
|
+
"include": "#regex_sub"
|
514
|
+
}
|
515
|
+
]
|
516
|
+
},
|
517
|
+
{
|
518
|
+
"begin": "%r\\{",
|
519
|
+
"beginCaptures": {
|
520
|
+
"0": {
|
521
|
+
"name": "punctuation.definition.string.begin.ruby"
|
522
|
+
}
|
523
|
+
},
|
524
|
+
"comment": "regular expressions (literal)",
|
525
|
+
"end": "\\}[eimnosux]*",
|
526
|
+
"endCaptures": {
|
527
|
+
"0": {
|
528
|
+
"name": "punctuation.definition.string.end.ruby"
|
529
|
+
}
|
530
|
+
},
|
531
|
+
"name": "string.regexp.mod-r.ruby",
|
532
|
+
"patterns": [
|
533
|
+
{
|
534
|
+
"include": "#regex_sub"
|
535
|
+
},
|
536
|
+
{
|
537
|
+
"include": "#nest_curly_r"
|
538
|
+
}
|
539
|
+
]
|
540
|
+
},
|
541
|
+
{
|
542
|
+
"begin": "%r\\[",
|
543
|
+
"beginCaptures": {
|
544
|
+
"0": {
|
545
|
+
"name": "punctuation.definition.string.begin.ruby"
|
546
|
+
}
|
547
|
+
},
|
548
|
+
"comment": "regular expressions (literal)",
|
549
|
+
"end": "\\][eimnosux]*",
|
550
|
+
"endCaptures": {
|
551
|
+
"0": {
|
552
|
+
"name": "punctuation.definition.string.end.ruby"
|
553
|
+
}
|
554
|
+
},
|
555
|
+
"name": "string.regexp.mod-r.ruby",
|
556
|
+
"patterns": [
|
557
|
+
{
|
558
|
+
"include": "#regex_sub"
|
559
|
+
},
|
560
|
+
{
|
561
|
+
"include": "#nest_brackets_r"
|
562
|
+
}
|
563
|
+
]
|
564
|
+
},
|
565
|
+
{
|
566
|
+
"begin": "%r\\(",
|
567
|
+
"beginCaptures": {
|
568
|
+
"0": {
|
569
|
+
"name": "punctuation.definition.string.begin.ruby"
|
570
|
+
}
|
571
|
+
},
|
572
|
+
"comment": "regular expressions (literal)",
|
573
|
+
"end": "\\)[eimnosux]*",
|
574
|
+
"endCaptures": {
|
575
|
+
"0": {
|
576
|
+
"name": "punctuation.definition.string.end.ruby"
|
577
|
+
}
|
578
|
+
},
|
579
|
+
"name": "string.regexp.mod-r.ruby",
|
580
|
+
"patterns": [
|
581
|
+
{
|
582
|
+
"include": "#regex_sub"
|
583
|
+
},
|
584
|
+
{
|
585
|
+
"include": "#nest_parens_r"
|
586
|
+
}
|
587
|
+
]
|
588
|
+
},
|
589
|
+
{
|
590
|
+
"begin": "%r\\<",
|
591
|
+
"beginCaptures": {
|
592
|
+
"0": {
|
593
|
+
"name": "punctuation.definition.string.begin.ruby"
|
594
|
+
}
|
595
|
+
},
|
596
|
+
"comment": "regular expressions (literal)",
|
597
|
+
"end": "\\>[eimnosux]*",
|
598
|
+
"endCaptures": {
|
599
|
+
"0": {
|
600
|
+
"name": "punctuation.definition.string.end.ruby"
|
601
|
+
}
|
602
|
+
},
|
603
|
+
"name": "string.regexp.mod-r.ruby",
|
604
|
+
"patterns": [
|
605
|
+
{
|
606
|
+
"include": "#regex_sub"
|
607
|
+
},
|
608
|
+
{
|
609
|
+
"include": "#nest_ltgt_r"
|
610
|
+
}
|
611
|
+
]
|
612
|
+
},
|
613
|
+
{
|
614
|
+
"begin": "%r([^\\w])",
|
615
|
+
"beginCaptures": {
|
616
|
+
"0": {
|
617
|
+
"name": "punctuation.definition.string.begin.ruby"
|
618
|
+
}
|
619
|
+
},
|
620
|
+
"comment": "regular expressions (literal)",
|
621
|
+
"end": "\\1[eimnosux]*",
|
622
|
+
"endCaptures": {
|
623
|
+
"0": {
|
624
|
+
"name": "punctuation.definition.string.end.ruby"
|
625
|
+
}
|
626
|
+
},
|
627
|
+
"name": "string.regexp.mod-r.ruby",
|
628
|
+
"patterns": [
|
629
|
+
{
|
630
|
+
"include": "#regex_sub"
|
631
|
+
}
|
632
|
+
]
|
633
|
+
},
|
634
|
+
{
|
635
|
+
"begin": "%[QWSR]?\\(",
|
636
|
+
"beginCaptures": {
|
637
|
+
"0": {
|
638
|
+
"name": "punctuation.definition.string.begin.ruby"
|
639
|
+
}
|
640
|
+
},
|
641
|
+
"comment": "literal capable of interpolation ()",
|
642
|
+
"end": "\\)",
|
643
|
+
"endCaptures": {
|
644
|
+
"0": {
|
645
|
+
"name": "punctuation.definition.string.end.ruby"
|
646
|
+
}
|
647
|
+
},
|
648
|
+
"name": "string.quoted.other.literal.upper.ruby",
|
649
|
+
"patterns": [
|
650
|
+
{
|
651
|
+
"include": "#interpolated_ruby"
|
652
|
+
},
|
653
|
+
{
|
654
|
+
"include": "#escaped_char"
|
655
|
+
},
|
656
|
+
{
|
657
|
+
"include": "#nest_parens_i"
|
658
|
+
}
|
659
|
+
]
|
660
|
+
},
|
661
|
+
{
|
662
|
+
"begin": "%[QWSR]?\\[",
|
663
|
+
"beginCaptures": {
|
664
|
+
"0": {
|
665
|
+
"name": "punctuation.definition.string.begin.ruby"
|
666
|
+
}
|
667
|
+
},
|
668
|
+
"comment": "literal capable of interpolation []",
|
669
|
+
"end": "\\]",
|
670
|
+
"endCaptures": {
|
671
|
+
"0": {
|
672
|
+
"name": "punctuation.definition.string.end.ruby"
|
673
|
+
}
|
674
|
+
},
|
675
|
+
"name": "string.quoted.other.literal.upper.ruby",
|
676
|
+
"patterns": [
|
677
|
+
{
|
678
|
+
"include": "#interpolated_ruby"
|
679
|
+
},
|
680
|
+
{
|
681
|
+
"include": "#escaped_char"
|
682
|
+
},
|
683
|
+
{
|
684
|
+
"include": "#nest_brackets_i"
|
685
|
+
}
|
686
|
+
]
|
687
|
+
},
|
688
|
+
{
|
689
|
+
"begin": "%[QWSR]?\\<",
|
690
|
+
"beginCaptures": {
|
691
|
+
"0": {
|
692
|
+
"name": "punctuation.definition.string.begin.ruby"
|
693
|
+
}
|
694
|
+
},
|
695
|
+
"comment": "literal capable of interpolation <>",
|
696
|
+
"end": "\\>",
|
697
|
+
"endCaptures": {
|
698
|
+
"0": {
|
699
|
+
"name": "punctuation.definition.string.end.ruby"
|
700
|
+
}
|
701
|
+
},
|
702
|
+
"name": "string.quoted.other.literal.upper.ruby",
|
703
|
+
"patterns": [
|
704
|
+
{
|
705
|
+
"include": "#interpolated_ruby"
|
706
|
+
},
|
707
|
+
{
|
708
|
+
"include": "#escaped_char"
|
709
|
+
},
|
710
|
+
{
|
711
|
+
"include": "#nest_ltgt_i"
|
712
|
+
}
|
713
|
+
]
|
714
|
+
},
|
715
|
+
{
|
716
|
+
"begin": "%[QWSR]?\\{",
|
717
|
+
"beginCaptures": {
|
718
|
+
"0": {
|
719
|
+
"name": "punctuation.definition.string.begin.ruby"
|
720
|
+
}
|
721
|
+
},
|
722
|
+
"comment": "literal capable of interpolation -- {}",
|
723
|
+
"end": "\\}",
|
724
|
+
"endCaptures": {
|
725
|
+
"0": {
|
726
|
+
"name": "punctuation.definition.string.end.ruby"
|
727
|
+
}
|
728
|
+
},
|
729
|
+
"name": "string.quoted.double.ruby.mod",
|
730
|
+
"patterns": [
|
731
|
+
{
|
732
|
+
"include": "#interpolated_ruby"
|
733
|
+
},
|
734
|
+
{
|
735
|
+
"include": "#escaped_char"
|
736
|
+
},
|
737
|
+
{
|
738
|
+
"include": "#nest_curly_i"
|
739
|
+
}
|
740
|
+
]
|
741
|
+
},
|
742
|
+
{
|
743
|
+
"begin": "%[QWSR]([^\\w])",
|
744
|
+
"beginCaptures": {
|
745
|
+
"0": {
|
746
|
+
"name": "punctuation.definition.string.begin.ruby"
|
747
|
+
}
|
748
|
+
},
|
749
|
+
"comment": "literal capable of interpolation -- wildcard",
|
750
|
+
"end": "\\1",
|
751
|
+
"endCaptures": {
|
752
|
+
"0": {
|
753
|
+
"name": "punctuation.definition.string.end.ruby"
|
754
|
+
}
|
755
|
+
},
|
756
|
+
"name": "string.quoted.other.literal.upper.ruby",
|
757
|
+
"patterns": [
|
758
|
+
{
|
759
|
+
"include": "#interpolated_ruby"
|
760
|
+
},
|
761
|
+
{
|
762
|
+
"include": "#escaped_char"
|
763
|
+
}
|
764
|
+
]
|
765
|
+
},
|
766
|
+
{
|
767
|
+
"begin": "%([^\\w\\s=])",
|
768
|
+
"beginCaptures": {
|
769
|
+
"0": {
|
770
|
+
"name": "punctuation.definition.string.begin.ruby"
|
771
|
+
}
|
772
|
+
},
|
773
|
+
"comment": "literal capable of interpolation -- wildcard",
|
774
|
+
"end": "\\1",
|
775
|
+
"endCaptures": {
|
776
|
+
"0": {
|
777
|
+
"name": "punctuation.definition.string.end.ruby"
|
778
|
+
}
|
779
|
+
},
|
780
|
+
"name": "string.quoted.other.literal.other.ruby",
|
781
|
+
"patterns": [
|
782
|
+
{
|
783
|
+
"include": "#interpolated_ruby"
|
784
|
+
},
|
785
|
+
{
|
786
|
+
"include": "#escaped_char"
|
787
|
+
}
|
788
|
+
]
|
789
|
+
},
|
790
|
+
{
|
791
|
+
"begin": "%[qws]\\(",
|
792
|
+
"beginCaptures": {
|
793
|
+
"0": {
|
794
|
+
"name": "punctuation.definition.string.begin.ruby"
|
795
|
+
}
|
796
|
+
},
|
797
|
+
"comment": "literal incapable of interpolation -- ()",
|
798
|
+
"end": "\\)",
|
799
|
+
"endCaptures": {
|
800
|
+
"0": {
|
801
|
+
"name": "punctuation.definition.string.end.ruby"
|
802
|
+
}
|
803
|
+
},
|
804
|
+
"name": "string.quoted.other.literal.lower.ruby",
|
805
|
+
"patterns": [
|
806
|
+
{
|
807
|
+
"match": "\\\\\\)|\\\\\\\\",
|
808
|
+
"name": "constant.character.escape.ruby"
|
809
|
+
},
|
810
|
+
{
|
811
|
+
"include": "#nest_parens"
|
812
|
+
}
|
813
|
+
]
|
814
|
+
},
|
815
|
+
{
|
816
|
+
"begin": "%[qws]\\<",
|
817
|
+
"beginCaptures": {
|
818
|
+
"0": {
|
819
|
+
"name": "punctuation.definition.string.begin.ruby"
|
820
|
+
}
|
821
|
+
},
|
822
|
+
"comment": "literal incapable of interpolation -- <>",
|
823
|
+
"end": "\\>",
|
824
|
+
"endCaptures": {
|
825
|
+
"0": {
|
826
|
+
"name": "punctuation.definition.string.end.ruby"
|
827
|
+
}
|
828
|
+
},
|
829
|
+
"name": "string.quoted.other.literal.lower.ruby",
|
830
|
+
"patterns": [
|
831
|
+
{
|
832
|
+
"match": "\\\\\\>|\\\\\\\\",
|
833
|
+
"name": "constant.character.escape.ruby"
|
834
|
+
},
|
835
|
+
{
|
836
|
+
"include": "#nest_ltgt"
|
837
|
+
}
|
838
|
+
]
|
839
|
+
},
|
840
|
+
{
|
841
|
+
"begin": "%[qws]\\[",
|
842
|
+
"beginCaptures": {
|
843
|
+
"0": {
|
844
|
+
"name": "punctuation.definition.string.begin.ruby"
|
845
|
+
}
|
846
|
+
},
|
847
|
+
"comment": "literal incapable of interpolation -- []",
|
848
|
+
"end": "\\]",
|
849
|
+
"endCaptures": {
|
850
|
+
"0": {
|
851
|
+
"name": "punctuation.definition.string.end.ruby"
|
852
|
+
}
|
853
|
+
},
|
854
|
+
"name": "string.quoted.other.literal.lower.ruby",
|
855
|
+
"patterns": [
|
856
|
+
{
|
857
|
+
"match": "\\\\\\]|\\\\\\\\",
|
858
|
+
"name": "constant.character.escape.ruby"
|
859
|
+
},
|
860
|
+
{
|
861
|
+
"include": "#nest_brackets"
|
862
|
+
}
|
863
|
+
]
|
864
|
+
},
|
865
|
+
{
|
866
|
+
"begin": "%[qws]\\{",
|
867
|
+
"beginCaptures": {
|
868
|
+
"0": {
|
869
|
+
"name": "punctuation.definition.string.begin.ruby"
|
870
|
+
}
|
871
|
+
},
|
872
|
+
"comment": "literal incapable of interpolation -- {}",
|
873
|
+
"end": "\\}",
|
874
|
+
"endCaptures": {
|
875
|
+
"0": {
|
876
|
+
"name": "punctuation.definition.string.end.ruby"
|
877
|
+
}
|
878
|
+
},
|
879
|
+
"name": "string.quoted.other.literal.lower.ruby",
|
880
|
+
"patterns": [
|
881
|
+
{
|
882
|
+
"match": "\\\\\\}|\\\\\\\\",
|
883
|
+
"name": "constant.character.escape.ruby"
|
884
|
+
},
|
885
|
+
{
|
886
|
+
"include": "#nest_curly"
|
887
|
+
}
|
888
|
+
]
|
889
|
+
},
|
890
|
+
{
|
891
|
+
"begin": "%[qws]([^\\w])",
|
892
|
+
"beginCaptures": {
|
893
|
+
"0": {
|
894
|
+
"name": "punctuation.definition.string.begin.ruby"
|
895
|
+
}
|
896
|
+
},
|
897
|
+
"comment": "literal incapable of interpolation -- wildcard",
|
898
|
+
"end": "\\1",
|
899
|
+
"endCaptures": {
|
900
|
+
"0": {
|
901
|
+
"name": "punctuation.definition.string.end.ruby"
|
902
|
+
}
|
903
|
+
},
|
904
|
+
"name": "string.quoted.other.literal.lower.ruby",
|
905
|
+
"patterns": [
|
906
|
+
{
|
907
|
+
"comment": "Cant be named because its not neccesarily an escape.",
|
908
|
+
"match": "\\\\."
|
909
|
+
}
|
910
|
+
]
|
911
|
+
},
|
912
|
+
{
|
913
|
+
"captures": {
|
914
|
+
"1": {
|
915
|
+
"name": "punctuation.definition.constant.ruby"
|
916
|
+
}
|
917
|
+
},
|
918
|
+
"comment": "symbols",
|
919
|
+
"match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`\/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)",
|
920
|
+
"name": "constant.other.symbol.ruby"
|
921
|
+
},
|
922
|
+
{
|
923
|
+
"captures": {
|
924
|
+
"1": {
|
925
|
+
"name": "punctuation.definition.constant.ruby"
|
926
|
+
}
|
927
|
+
},
|
928
|
+
"comment": "symbols",
|
929
|
+
"match": "(?>[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%`\/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)(:)(?!:)",
|
930
|
+
"name": "constant.other.symbol.ruby.19syntax"
|
931
|
+
},
|
932
|
+
{
|
933
|
+
"begin": "^=begin",
|
934
|
+
"captures": {
|
935
|
+
"0": {
|
936
|
+
"name": "punctuation.definition.comment.ruby"
|
937
|
+
}
|
938
|
+
},
|
939
|
+
"comment": "multiline comments",
|
940
|
+
"end": "^=end",
|
941
|
+
"name": "comment.block.documentation.ruby"
|
942
|
+
},
|
943
|
+
{
|
944
|
+
"captures": {
|
945
|
+
"1": {
|
946
|
+
"name": "punctuation.definition.comment.ruby"
|
947
|
+
}
|
948
|
+
},
|
949
|
+
"match": "(?:^[ \\t]+)?(#).*$\\n?",
|
950
|
+
"name": "comment.line.number-sign.ruby"
|
951
|
+
},
|
952
|
+
{
|
953
|
+
"comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t",
|
954
|
+
"match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
|
955
|
+
"name": "constant.numeric.ruby"
|
956
|
+
},
|
957
|
+
{
|
958
|
+
"begin": "^__END__\\n",
|
959
|
+
"captures": {
|
960
|
+
"0": {
|
961
|
+
"name": "string.unquoted.program-block.ruby"
|
962
|
+
}
|
963
|
+
},
|
964
|
+
"comment": "__END__ marker",
|
965
|
+
"contentName": "text.plain",
|
966
|
+
"end": "(?=not)impossible",
|
967
|
+
"patterns": [
|
968
|
+
{
|
969
|
+
"begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))",
|
970
|
+
"end": "(?=not)impossible",
|
971
|
+
"name": "text.html.embedded.ruby",
|
972
|
+
"patterns": [
|
973
|
+
{
|
974
|
+
"include": "text.html.basic"
|
975
|
+
}
|
976
|
+
]
|
977
|
+
}
|
978
|
+
]
|
979
|
+
},
|
980
|
+
{
|
981
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
|
982
|
+
"beginCaptures": {
|
983
|
+
"0": {
|
984
|
+
"name": "punctuation.definition.string.begin.ruby"
|
985
|
+
}
|
986
|
+
},
|
987
|
+
"comment": "heredoc with embedded HTML and indented terminator",
|
988
|
+
"contentName": "text.html.embedded.ruby",
|
989
|
+
"end": "\\s*\\2$",
|
990
|
+
"endCaptures": {
|
991
|
+
"0": {
|
992
|
+
"name": "punctuation.definition.string.end.ruby"
|
993
|
+
}
|
994
|
+
},
|
995
|
+
"name": "string.unquoted.embedded.html.ruby",
|
996
|
+
"patterns": [
|
997
|
+
{
|
998
|
+
"include": "#heredoc"
|
999
|
+
},
|
1000
|
+
{
|
1001
|
+
"include": "text.html.basic"
|
1002
|
+
},
|
1003
|
+
{
|
1004
|
+
"include": "#interpolated_ruby"
|
1005
|
+
},
|
1006
|
+
{
|
1007
|
+
"include": "#escaped_char"
|
1008
|
+
}
|
1009
|
+
]
|
1010
|
+
},
|
1011
|
+
{
|
1012
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
|
1013
|
+
"beginCaptures": {
|
1014
|
+
"0": {
|
1015
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1016
|
+
}
|
1017
|
+
},
|
1018
|
+
"comment": "heredoc with embedded SQL and indented terminator",
|
1019
|
+
"contentName": "text.sql.embedded.ruby",
|
1020
|
+
"end": "\\s*\\2$",
|
1021
|
+
"endCaptures": {
|
1022
|
+
"0": {
|
1023
|
+
"name": "punctuation.definition.string.end.ruby"
|
1024
|
+
}
|
1025
|
+
},
|
1026
|
+
"name": "string.unquoted.embedded.sql.ruby",
|
1027
|
+
"patterns": [
|
1028
|
+
{
|
1029
|
+
"include": "#heredoc"
|
1030
|
+
},
|
1031
|
+
{
|
1032
|
+
"include": "source.sql"
|
1033
|
+
},
|
1034
|
+
{
|
1035
|
+
"include": "#interpolated_ruby"
|
1036
|
+
},
|
1037
|
+
{
|
1038
|
+
"include": "#escaped_char"
|
1039
|
+
}
|
1040
|
+
]
|
1041
|
+
},
|
1042
|
+
{
|
1043
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
|
1044
|
+
"beginCaptures": {
|
1045
|
+
"0": {
|
1046
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1047
|
+
}
|
1048
|
+
},
|
1049
|
+
"comment": "heredoc with embedded css and intented terminator",
|
1050
|
+
"contentName": "text.css.embedded.ruby",
|
1051
|
+
"end": "\\s*\\2$",
|
1052
|
+
"endCaptures": {
|
1053
|
+
"0": {
|
1054
|
+
"name": "punctuation.definition.string.end.ruby"
|
1055
|
+
}
|
1056
|
+
},
|
1057
|
+
"name": "string.unquoted.embedded.css.ruby",
|
1058
|
+
"patterns": [
|
1059
|
+
{
|
1060
|
+
"include": "#heredoc"
|
1061
|
+
},
|
1062
|
+
{
|
1063
|
+
"include": "source.css"
|
1064
|
+
},
|
1065
|
+
{
|
1066
|
+
"include": "#interpolated_ruby"
|
1067
|
+
},
|
1068
|
+
{
|
1069
|
+
"include": "#escaped_char"
|
1070
|
+
}
|
1071
|
+
]
|
1072
|
+
},
|
1073
|
+
{
|
1074
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
|
1075
|
+
"beginCaptures": {
|
1076
|
+
"0": {
|
1077
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1078
|
+
}
|
1079
|
+
},
|
1080
|
+
"comment": "heredoc with embedded c++ and intented terminator",
|
1081
|
+
"contentName": "text.c++.embedded.ruby",
|
1082
|
+
"end": "\\s*\\2$",
|
1083
|
+
"endCaptures": {
|
1084
|
+
"0": {
|
1085
|
+
"name": "punctuation.definition.string.end.ruby"
|
1086
|
+
}
|
1087
|
+
},
|
1088
|
+
"name": "string.unquoted.embedded.cplusplus.ruby",
|
1089
|
+
"patterns": [
|
1090
|
+
{
|
1091
|
+
"include": "#heredoc"
|
1092
|
+
},
|
1093
|
+
{
|
1094
|
+
"include": "source.c++"
|
1095
|
+
},
|
1096
|
+
{
|
1097
|
+
"include": "#interpolated_ruby"
|
1098
|
+
},
|
1099
|
+
{
|
1100
|
+
"include": "#escaped_char"
|
1101
|
+
}
|
1102
|
+
]
|
1103
|
+
},
|
1104
|
+
{
|
1105
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1)",
|
1106
|
+
"beginCaptures": {
|
1107
|
+
"0": {
|
1108
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1109
|
+
}
|
1110
|
+
},
|
1111
|
+
"comment": "heredoc with embedded c++ and intented terminator",
|
1112
|
+
"contentName": "text.c.embedded.ruby",
|
1113
|
+
"end": "\\s*\\2$",
|
1114
|
+
"endCaptures": {
|
1115
|
+
"0": {
|
1116
|
+
"name": "punctuation.definition.string.end.ruby"
|
1117
|
+
}
|
1118
|
+
},
|
1119
|
+
"name": "string.unquoted.embedded.c.ruby",
|
1120
|
+
"patterns": [
|
1121
|
+
{
|
1122
|
+
"include": "#heredoc"
|
1123
|
+
},
|
1124
|
+
{
|
1125
|
+
"include": "source.c"
|
1126
|
+
},
|
1127
|
+
{
|
1128
|
+
"include": "#interpolated_ruby"
|
1129
|
+
},
|
1130
|
+
{
|
1131
|
+
"include": "#escaped_char"
|
1132
|
+
}
|
1133
|
+
]
|
1134
|
+
},
|
1135
|
+
{
|
1136
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
|
1137
|
+
"beginCaptures": {
|
1138
|
+
"0": {
|
1139
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1140
|
+
}
|
1141
|
+
},
|
1142
|
+
"comment": "heredoc with embedded javascript and intented terminator",
|
1143
|
+
"contentName": "text.js.embedded.ruby",
|
1144
|
+
"end": "\\s*\\2$",
|
1145
|
+
"endCaptures": {
|
1146
|
+
"0": {
|
1147
|
+
"name": "punctuation.definition.string.end.ruby"
|
1148
|
+
}
|
1149
|
+
},
|
1150
|
+
"name": "string.unquoted.embedded.js.ruby",
|
1151
|
+
"patterns": [
|
1152
|
+
{
|
1153
|
+
"include": "#heredoc"
|
1154
|
+
},
|
1155
|
+
{
|
1156
|
+
"include": "source.js"
|
1157
|
+
},
|
1158
|
+
{
|
1159
|
+
"include": "#interpolated_ruby"
|
1160
|
+
},
|
1161
|
+
{
|
1162
|
+
"include": "#escaped_char"
|
1163
|
+
}
|
1164
|
+
]
|
1165
|
+
},
|
1166
|
+
{
|
1167
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
|
1168
|
+
"beginCaptures": {
|
1169
|
+
"0": {
|
1170
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1171
|
+
}
|
1172
|
+
},
|
1173
|
+
"comment": "heredoc with embedded javascript and intented terminator",
|
1174
|
+
"contentName": "text.js.jquery.embedded.ruby",
|
1175
|
+
"end": "\\s*\\2$",
|
1176
|
+
"endCaptures": {
|
1177
|
+
"0": {
|
1178
|
+
"name": "punctuation.definition.string.end.ruby"
|
1179
|
+
}
|
1180
|
+
},
|
1181
|
+
"name": "string.unquoted.embedded.js.jquery.ruby",
|
1182
|
+
"patterns": [
|
1183
|
+
{
|
1184
|
+
"include": "#heredoc"
|
1185
|
+
},
|
1186
|
+
{
|
1187
|
+
"include": "source.js.jquery"
|
1188
|
+
},
|
1189
|
+
{
|
1190
|
+
"include": "#interpolated_ruby"
|
1191
|
+
},
|
1192
|
+
{
|
1193
|
+
"include": "#escaped_char"
|
1194
|
+
}
|
1195
|
+
]
|
1196
|
+
},
|
1197
|
+
{
|
1198
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
|
1199
|
+
"beginCaptures": {
|
1200
|
+
"0": {
|
1201
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1202
|
+
}
|
1203
|
+
},
|
1204
|
+
"comment": "heredoc with embedded shell and intented terminator",
|
1205
|
+
"contentName": "text.shell.embedded.ruby",
|
1206
|
+
"end": "\\s*\\2$",
|
1207
|
+
"endCaptures": {
|
1208
|
+
"0": {
|
1209
|
+
"name": "punctuation.definition.string.end.ruby"
|
1210
|
+
}
|
1211
|
+
},
|
1212
|
+
"name": "string.unquoted.embedded.shell.ruby",
|
1213
|
+
"patterns": [
|
1214
|
+
{
|
1215
|
+
"include": "#heredoc"
|
1216
|
+
},
|
1217
|
+
{
|
1218
|
+
"include": "source.shell"
|
1219
|
+
},
|
1220
|
+
{
|
1221
|
+
"include": "#interpolated_ruby"
|
1222
|
+
},
|
1223
|
+
{
|
1224
|
+
"include": "#escaped_char"
|
1225
|
+
}
|
1226
|
+
]
|
1227
|
+
},
|
1228
|
+
{
|
1229
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)RUBY)\\b\\1)",
|
1230
|
+
"beginCaptures": {
|
1231
|
+
"0": {
|
1232
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1233
|
+
}
|
1234
|
+
},
|
1235
|
+
"comment": "heredoc with embedded ruby and intented terminator",
|
1236
|
+
"contentName": "text.ruby.embedded.ruby",
|
1237
|
+
"end": "\\s*\\2$",
|
1238
|
+
"endCaptures": {
|
1239
|
+
"0": {
|
1240
|
+
"name": "punctuation.definition.string.end.ruby"
|
1241
|
+
}
|
1242
|
+
},
|
1243
|
+
"name": "string.unquoted.embedded.ruby.ruby",
|
1244
|
+
"patterns": [
|
1245
|
+
{
|
1246
|
+
"include": "#heredoc"
|
1247
|
+
},
|
1248
|
+
{
|
1249
|
+
"include": "source.ruby"
|
1250
|
+
},
|
1251
|
+
{
|
1252
|
+
"include": "#interpolated_ruby"
|
1253
|
+
},
|
1254
|
+
{
|
1255
|
+
"include": "#escaped_char"
|
1256
|
+
}
|
1257
|
+
]
|
1258
|
+
},
|
1259
|
+
{
|
1260
|
+
"begin": "(?>\\=\\s*<<(\\w+))",
|
1261
|
+
"beginCaptures": {
|
1262
|
+
"0": {
|
1263
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1264
|
+
}
|
1265
|
+
},
|
1266
|
+
"end": "^\\1$",
|
1267
|
+
"endCaptures": {
|
1268
|
+
"0": {
|
1269
|
+
"name": "punctuation.definition.string.end.ruby"
|
1270
|
+
}
|
1271
|
+
},
|
1272
|
+
"name": "string.unquoted.heredoc.ruby",
|
1273
|
+
"patterns": [
|
1274
|
+
{
|
1275
|
+
"include": "#heredoc"
|
1276
|
+
},
|
1277
|
+
{
|
1278
|
+
"include": "#interpolated_ruby"
|
1279
|
+
},
|
1280
|
+
{
|
1281
|
+
"include": "#escaped_char"
|
1282
|
+
}
|
1283
|
+
]
|
1284
|
+
},
|
1285
|
+
{
|
1286
|
+
"begin": "(?><<-(\\w+))",
|
1287
|
+
"beginCaptures": {
|
1288
|
+
"0": {
|
1289
|
+
"name": "punctuation.definition.string.begin.ruby"
|
1290
|
+
}
|
1291
|
+
},
|
1292
|
+
"comment": "heredoc with indented terminator",
|
1293
|
+
"end": "\\s*\\1$",
|
1294
|
+
"endCaptures": {
|
1295
|
+
"0": {
|
1296
|
+
"name": "punctuation.definition.string.end.ruby"
|
1297
|
+
}
|
1298
|
+
},
|
1299
|
+
"name": "string.unquoted.heredoc.ruby",
|
1300
|
+
"patterns": [
|
1301
|
+
{
|
1302
|
+
"include": "#heredoc"
|
1303
|
+
},
|
1304
|
+
{
|
1305
|
+
"include": "#interpolated_ruby"
|
1306
|
+
},
|
1307
|
+
{
|
1308
|
+
"include": "#escaped_char"
|
1309
|
+
}
|
1310
|
+
]
|
1311
|
+
},
|
1312
|
+
{
|
1313
|
+
"begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)",
|
1314
|
+
"captures": {
|
1315
|
+
"1": {
|
1316
|
+
"name": "punctuation.separator.variable.ruby"
|
1317
|
+
}
|
1318
|
+
},
|
1319
|
+
"end": "(\\|)",
|
1320
|
+
"patterns": [
|
1321
|
+
{
|
1322
|
+
"match": "[_a-zA-Z][_a-zA-Z0-9]*",
|
1323
|
+
"name": "variable.other.block.ruby"
|
1324
|
+
},
|
1325
|
+
{
|
1326
|
+
"match": ",",
|
1327
|
+
"name": "punctuation.separator.variable.ruby"
|
1328
|
+
}
|
1329
|
+
]
|
1330
|
+
},
|
1331
|
+
{
|
1332
|
+
"match": "=>",
|
1333
|
+
"name": "punctuation.separator.key-value"
|
1334
|
+
},
|
1335
|
+
{
|
1336
|
+
"match": "<<=|%=|&=|\\*=|\\*\\*=|\\+=|\\-=|\\^=|\\|{1,2}=|<<",
|
1337
|
+
"name": "keyword.operator.assignment.augmented.ruby"
|
1338
|
+
},
|
1339
|
+
{
|
1340
|
+
"match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?",
|
1341
|
+
"name": "keyword.operator.comparison.ruby"
|
1342
|
+
},
|
1343
|
+
{
|
1344
|
+
"match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\^",
|
1345
|
+
"name": "keyword.operator.logical.ruby"
|
1346
|
+
},
|
1347
|
+
{
|
1348
|
+
"match": "(%|&|\\*\\*|\\*|\\+|\\-|\/)",
|
1349
|
+
"name": "keyword.operator.arithmetic.ruby"
|
1350
|
+
},
|
1351
|
+
{
|
1352
|
+
"match": "=",
|
1353
|
+
"name": "keyword.operator.assignment.ruby"
|
1354
|
+
},
|
1355
|
+
{
|
1356
|
+
"match": "\\||~|>>",
|
1357
|
+
"name": "keyword.operator.other.ruby"
|
1358
|
+
},
|
1359
|
+
{
|
1360
|
+
"match": ":",
|
1361
|
+
"name": "punctuation.separator.other.ruby"
|
1362
|
+
},
|
1363
|
+
{
|
1364
|
+
"match": "\\;",
|
1365
|
+
"name": "punctuation.separator.statement.ruby"
|
1366
|
+
},
|
1367
|
+
{
|
1368
|
+
"match": ",",
|
1369
|
+
"name": "punctuation.separator.object.ruby"
|
1370
|
+
},
|
1371
|
+
{
|
1372
|
+
"match": "\\.|::",
|
1373
|
+
"name": "punctuation.separator.method.ruby"
|
1374
|
+
},
|
1375
|
+
{
|
1376
|
+
"match": "\\{|\\}",
|
1377
|
+
"name": "punctuation.section.scope.ruby"
|
1378
|
+
},
|
1379
|
+
{
|
1380
|
+
"match": "\\[|\\]",
|
1381
|
+
"name": "punctuation.section.array.ruby"
|
1382
|
+
},
|
1383
|
+
{
|
1384
|
+
"match": "\\(|\\)",
|
1385
|
+
"name": "punctuation.section.function.ruby"
|
1386
|
+
}
|
1387
|
+
],
|
1388
|
+
"repository": {
|
1389
|
+
"escaped_char": {
|
1390
|
+
"match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)",
|
1391
|
+
"name": "constant.character.escape.ruby"
|
1392
|
+
},
|
1393
|
+
"heredoc": {
|
1394
|
+
"begin": "^<<-?\\w+",
|
1395
|
+
"end": "$",
|
1396
|
+
"patterns": [
|
1397
|
+
{
|
1398
|
+
"include": "$self"
|
1399
|
+
}
|
1400
|
+
]
|
1401
|
+
},
|
1402
|
+
"interpolated_ruby": {
|
1403
|
+
"patterns": [
|
1404
|
+
{
|
1405
|
+
"captures": {
|
1406
|
+
"0": {
|
1407
|
+
"name": "punctuation.section.embedded.ruby"
|
1408
|
+
},
|
1409
|
+
"1": {
|
1410
|
+
"name": "source.ruby.embedded.source.empty"
|
1411
|
+
}
|
1412
|
+
},
|
1413
|
+
"match": "#\\{(\\})",
|
1414
|
+
"name": "source.ruby.embedded.source"
|
1415
|
+
},
|
1416
|
+
{
|
1417
|
+
"begin": "#\\{",
|
1418
|
+
"captures": {
|
1419
|
+
"0": {
|
1420
|
+
"name": "punctuation.section.embedded.ruby"
|
1421
|
+
}
|
1422
|
+
},
|
1423
|
+
"end": "\\}",
|
1424
|
+
"name": "source.ruby.embedded.source",
|
1425
|
+
"patterns": [
|
1426
|
+
{
|
1427
|
+
"include": "#nest_curly_and_self"
|
1428
|
+
},
|
1429
|
+
{
|
1430
|
+
"include": "$self"
|
1431
|
+
}
|
1432
|
+
]
|
1433
|
+
},
|
1434
|
+
{
|
1435
|
+
"captures": {
|
1436
|
+
"1": {
|
1437
|
+
"name": "punctuation.definition.variable.ruby"
|
1438
|
+
}
|
1439
|
+
},
|
1440
|
+
"match": "(#@)[a-zA-Z_]\\w*",
|
1441
|
+
"name": "variable.other.readwrite.instance.ruby"
|
1442
|
+
},
|
1443
|
+
{
|
1444
|
+
"captures": {
|
1445
|
+
"1": {
|
1446
|
+
"name": "punctuation.definition.variable.ruby"
|
1447
|
+
}
|
1448
|
+
},
|
1449
|
+
"match": "(#@@)[a-zA-Z_]\\w*",
|
1450
|
+
"name": "variable.other.readwrite.class.ruby"
|
1451
|
+
},
|
1452
|
+
{
|
1453
|
+
"captures": {
|
1454
|
+
"1": {
|
1455
|
+
"name": "punctuation.definition.variable.ruby"
|
1456
|
+
}
|
1457
|
+
},
|
1458
|
+
"match": "(#\\$)[a-zA-Z_]\\w*",
|
1459
|
+
"name": "variable.other.readwrite.global.ruby"
|
1460
|
+
}
|
1461
|
+
]
|
1462
|
+
},
|
1463
|
+
"nest_brackets": {
|
1464
|
+
"begin": "\\[",
|
1465
|
+
"captures": {
|
1466
|
+
"0": {
|
1467
|
+
"name": "punctuation.section.scope.ruby"
|
1468
|
+
}
|
1469
|
+
},
|
1470
|
+
"end": "\\]",
|
1471
|
+
"patterns": [
|
1472
|
+
{
|
1473
|
+
"include": "#nest_brackets"
|
1474
|
+
}
|
1475
|
+
]
|
1476
|
+
},
|
1477
|
+
"nest_brackets_i": {
|
1478
|
+
"begin": "\\[",
|
1479
|
+
"captures": {
|
1480
|
+
"0": {
|
1481
|
+
"name": "punctuation.section.scope.ruby"
|
1482
|
+
}
|
1483
|
+
},
|
1484
|
+
"end": "\\]",
|
1485
|
+
"patterns": [
|
1486
|
+
{
|
1487
|
+
"include": "#interpolated_ruby"
|
1488
|
+
},
|
1489
|
+
{
|
1490
|
+
"include": "#escaped_char"
|
1491
|
+
},
|
1492
|
+
{
|
1493
|
+
"include": "#nest_brackets_i"
|
1494
|
+
}
|
1495
|
+
]
|
1496
|
+
},
|
1497
|
+
"nest_brackets_r": {
|
1498
|
+
"begin": "\\[",
|
1499
|
+
"captures": {
|
1500
|
+
"0": {
|
1501
|
+
"name": "punctuation.section.scope.ruby"
|
1502
|
+
}
|
1503
|
+
},
|
1504
|
+
"end": "\\]",
|
1505
|
+
"patterns": [
|
1506
|
+
{
|
1507
|
+
"include": "#regex_sub"
|
1508
|
+
},
|
1509
|
+
{
|
1510
|
+
"include": "#nest_brackets_r"
|
1511
|
+
}
|
1512
|
+
]
|
1513
|
+
},
|
1514
|
+
"nest_curly": {
|
1515
|
+
"begin": "\\{",
|
1516
|
+
"captures": {
|
1517
|
+
"0": {
|
1518
|
+
"name": "punctuation.section.scope.ruby"
|
1519
|
+
}
|
1520
|
+
},
|
1521
|
+
"end": "\\}",
|
1522
|
+
"patterns": [
|
1523
|
+
{
|
1524
|
+
"include": "#nest_curly"
|
1525
|
+
}
|
1526
|
+
]
|
1527
|
+
},
|
1528
|
+
"nest_curly_and_self": {
|
1529
|
+
"patterns": [
|
1530
|
+
{
|
1531
|
+
"begin": "\\{",
|
1532
|
+
"captures": {
|
1533
|
+
"0": {
|
1534
|
+
"name": "punctuation.section.scope.ruby"
|
1535
|
+
}
|
1536
|
+
},
|
1537
|
+
"end": "\\}",
|
1538
|
+
"patterns": [
|
1539
|
+
{
|
1540
|
+
"include": "#nest_curly_and_self"
|
1541
|
+
}
|
1542
|
+
]
|
1543
|
+
},
|
1544
|
+
{
|
1545
|
+
"include": "$self"
|
1546
|
+
}
|
1547
|
+
]
|
1548
|
+
},
|
1549
|
+
"nest_curly_i": {
|
1550
|
+
"begin": "\\{",
|
1551
|
+
"captures": {
|
1552
|
+
"0": {
|
1553
|
+
"name": "punctuation.section.scope.ruby"
|
1554
|
+
}
|
1555
|
+
},
|
1556
|
+
"end": "\\}",
|
1557
|
+
"patterns": [
|
1558
|
+
{
|
1559
|
+
"include": "#interpolated_ruby"
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
"include": "#escaped_char"
|
1563
|
+
},
|
1564
|
+
{
|
1565
|
+
"include": "#nest_curly_i"
|
1566
|
+
}
|
1567
|
+
]
|
1568
|
+
},
|
1569
|
+
"nest_curly_r": {
|
1570
|
+
"begin": "\\{",
|
1571
|
+
"captures": {
|
1572
|
+
"0": {
|
1573
|
+
"name": "punctuation.section.scope.ruby"
|
1574
|
+
}
|
1575
|
+
},
|
1576
|
+
"end": "\\}",
|
1577
|
+
"patterns": [
|
1578
|
+
{
|
1579
|
+
"include": "#regex_sub"
|
1580
|
+
},
|
1581
|
+
{
|
1582
|
+
"include": "#nest_curly_r"
|
1583
|
+
}
|
1584
|
+
]
|
1585
|
+
},
|
1586
|
+
"nest_ltgt": {
|
1587
|
+
"begin": "\\<",
|
1588
|
+
"captures": {
|
1589
|
+
"0": {
|
1590
|
+
"name": "punctuation.section.scope.ruby"
|
1591
|
+
}
|
1592
|
+
},
|
1593
|
+
"end": "\\>",
|
1594
|
+
"patterns": [
|
1595
|
+
{
|
1596
|
+
"include": "#nest_ltgt"
|
1597
|
+
}
|
1598
|
+
]
|
1599
|
+
},
|
1600
|
+
"nest_ltgt_i": {
|
1601
|
+
"begin": "\\<",
|
1602
|
+
"captures": {
|
1603
|
+
"0": {
|
1604
|
+
"name": "punctuation.section.scope.ruby"
|
1605
|
+
}
|
1606
|
+
},
|
1607
|
+
"end": "\\>",
|
1608
|
+
"patterns": [
|
1609
|
+
{
|
1610
|
+
"include": "#interpolated_ruby"
|
1611
|
+
},
|
1612
|
+
{
|
1613
|
+
"include": "#escaped_char"
|
1614
|
+
},
|
1615
|
+
{
|
1616
|
+
"include": "#nest_ltgt_i"
|
1617
|
+
}
|
1618
|
+
]
|
1619
|
+
},
|
1620
|
+
"nest_ltgt_r": {
|
1621
|
+
"begin": "\\<",
|
1622
|
+
"captures": {
|
1623
|
+
"0": {
|
1624
|
+
"name": "punctuation.section.scope.ruby"
|
1625
|
+
}
|
1626
|
+
},
|
1627
|
+
"end": "\\>",
|
1628
|
+
"patterns": [
|
1629
|
+
{
|
1630
|
+
"include": "#regex_sub"
|
1631
|
+
},
|
1632
|
+
{
|
1633
|
+
"include": "#nest_ltgt_r"
|
1634
|
+
}
|
1635
|
+
]
|
1636
|
+
},
|
1637
|
+
"nest_parens": {
|
1638
|
+
"begin": "\\(",
|
1639
|
+
"captures": {
|
1640
|
+
"0": {
|
1641
|
+
"name": "punctuation.section.scope.ruby"
|
1642
|
+
}
|
1643
|
+
},
|
1644
|
+
"end": "\\)",
|
1645
|
+
"patterns": [
|
1646
|
+
{
|
1647
|
+
"include": "#nest_parens"
|
1648
|
+
}
|
1649
|
+
]
|
1650
|
+
},
|
1651
|
+
"nest_parens_i": {
|
1652
|
+
"begin": "\\(",
|
1653
|
+
"captures": {
|
1654
|
+
"0": {
|
1655
|
+
"name": "punctuation.section.scope.ruby"
|
1656
|
+
}
|
1657
|
+
},
|
1658
|
+
"end": "\\)",
|
1659
|
+
"patterns": [
|
1660
|
+
{
|
1661
|
+
"include": "#interpolated_ruby"
|
1662
|
+
},
|
1663
|
+
{
|
1664
|
+
"include": "#escaped_char"
|
1665
|
+
},
|
1666
|
+
{
|
1667
|
+
"include": "#nest_parens_i"
|
1668
|
+
}
|
1669
|
+
]
|
1670
|
+
},
|
1671
|
+
"nest_parens_r": {
|
1672
|
+
"begin": "\\(",
|
1673
|
+
"captures": {
|
1674
|
+
"0": {
|
1675
|
+
"name": "punctuation.section.scope.ruby"
|
1676
|
+
}
|
1677
|
+
},
|
1678
|
+
"end": "\\)",
|
1679
|
+
"patterns": [
|
1680
|
+
{
|
1681
|
+
"include": "#regex_sub"
|
1682
|
+
},
|
1683
|
+
{
|
1684
|
+
"include": "#nest_parens_r"
|
1685
|
+
}
|
1686
|
+
]
|
1687
|
+
},
|
1688
|
+
"regex_sub": {
|
1689
|
+
"patterns": [
|
1690
|
+
{
|
1691
|
+
"include": "#interpolated_ruby"
|
1692
|
+
},
|
1693
|
+
{
|
1694
|
+
"include": "#escaped_char"
|
1695
|
+
},
|
1696
|
+
{
|
1697
|
+
"captures": {
|
1698
|
+
"1": {
|
1699
|
+
"name": "punctuation.definition.arbitrary-repitition.ruby"
|
1700
|
+
},
|
1701
|
+
"3": {
|
1702
|
+
"name": "punctuation.definition.arbitrary-repitition.ruby"
|
1703
|
+
}
|
1704
|
+
},
|
1705
|
+
"match": "(\\{)\\d+(,\\d+)?(\\})",
|
1706
|
+
"name": "string.regexp.arbitrary-repitition.ruby"
|
1707
|
+
},
|
1708
|
+
{
|
1709
|
+
"begin": "\\[(?:\\^?\\])?",
|
1710
|
+
"captures": {
|
1711
|
+
"0": {
|
1712
|
+
"name": "punctuation.definition.character-class.ruby"
|
1713
|
+
}
|
1714
|
+
},
|
1715
|
+
"end": "\\]",
|
1716
|
+
"name": "string.regexp.character-class.ruby",
|
1717
|
+
"patterns": [
|
1718
|
+
{
|
1719
|
+
"include": "#escaped_char"
|
1720
|
+
}
|
1721
|
+
]
|
1722
|
+
},
|
1723
|
+
{
|
1724
|
+
"begin": "\\(",
|
1725
|
+
"captures": {
|
1726
|
+
"0": {
|
1727
|
+
"name": "punctuation.definition.group.ruby"
|
1728
|
+
}
|
1729
|
+
},
|
1730
|
+
"end": "\\)",
|
1731
|
+
"name": "string.regexp.group.ruby",
|
1732
|
+
"patterns": [
|
1733
|
+
{
|
1734
|
+
"include": "#regex_sub"
|
1735
|
+
}
|
1736
|
+
]
|
1737
|
+
},
|
1738
|
+
{
|
1739
|
+
"captures": {
|
1740
|
+
"1": {
|
1741
|
+
"name": "punctuation.definition.comment.ruby"
|
1742
|
+
}
|
1743
|
+
},
|
1744
|
+
"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.",
|
1745
|
+
"match": "(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$",
|
1746
|
+
"name": "comment.line.number-sign.ruby"
|
1747
|
+
}
|
1748
|
+
]
|
1749
|
+
}
|
1750
|
+
},
|
1751
|
+
"scopeName": "source.ruby",
|
1752
|
+
"uuid": "E00B62AC-6B1C-11D9-9B1F-000D93589AF6"
|
1753
|
+
}
|