Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions syntaxes/ruby.cson.json
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,7 @@
},
{
"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.variable.ruby"
Expand All @@ -2072,11 +2073,24 @@
"end": "(?<!\\|)(\\|)(?!\\|)",
"patterns": [
{
"include": "source.ruby"
},
{
"match": "[_a-zA-Z][_a-zA-Z0-9]*",
"name": "variable.other.block.ruby"
"begin": "(?![\\s,|(])",
"end": "(?=,|\\|\\s*)",
"patterns": [
{
"match": "\\G([&*]?)([a-zA-Z][\\w_]*)|(_[\\w_]*)",
"captures": {
"1": {
"name": "storage.type.variable.ruby"
},
"2": {
"name": "variable.other.block.ruby"
},
"3": {
"name": "variable.other.block.unused.ruby variable.other.constant.ruby"
}
}
}
]
},
{
"match": ",",
Expand Down Expand Up @@ -2201,7 +2215,7 @@
]
},
{
"comment": "This is kindof experimental. There really is no way to perfectly match all regular variables, but you can pretty well assume that any normal word in certain curcumstances that havnt already been scoped as something else are probably variables, and the advantages beat the potential errors",
"comment": "This is kindof experimental. There really is no way to perfectly match all regular variables, but you can pretty well assume that any normal word in certain curcumstances that haven't already been scoped as something else are probably variables, and the advantages beat the potential errors",
"match": "((?<=\\W)\\b|^)\\w+\\b(?=\\s*([\\]\\)\\}\\=\\+\\-\\*\\/\\^\\$\\,\\.]|<\\s|<<[\\s|\\.]))",
"name": "variable.other.ruby"
}
Expand Down Expand Up @@ -2723,4 +2737,4 @@
}
}
}
}
}