|
115 | 115 | }, |
116 | 116 | "comment": "symbols as hash key (1.9 syntax)", |
117 | 117 | "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", |
118 | | - "name": "constant.other.symbol.hashkey.ruby" |
| 118 | + "name": "constant.language.symbol.hashkey.ruby" |
119 | 119 | }, |
120 | 120 | { |
121 | 121 | "captures": { |
|
125 | 125 | }, |
126 | 126 | "comment": "symbols as hash key (1.8 syntax)", |
127 | 127 | "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)", |
128 | | - "name": "constant.other.symbol.hashkey.ruby" |
| 128 | + "name": "constant.language.symbol.hashkey.ruby" |
129 | 129 | }, |
130 | 130 | { |
131 | 131 | "comment": "everything being a reserved word, not a value and needing a 'end' is a..", |
|
277 | 277 | "name": "storage.type.variable.ruby" |
278 | 278 | }, |
279 | 279 | "2": { |
280 | | - "name": "constant.other.symbol.hashkey.parameter.function.ruby" |
| 280 | + "name": "constant.language.symbol.hashkey.parameter.function.ruby" |
281 | 281 | }, |
282 | 282 | "3": { |
283 | 283 | "name": "punctuation.definition.constant.hashkey.ruby" |
|
319 | 319 | "name": "storage.type.variable.ruby" |
320 | 320 | }, |
321 | 321 | "2": { |
322 | | - "name": "constant.other.symbol.hashkey.parameter.function.ruby" |
| 322 | + "name": "constant.language.symbol.hashkey.parameter.function.ruby" |
323 | 323 | }, |
324 | 324 | "3": { |
325 | 325 | "name": "punctuation.definition.constant.hashkey.ruby" |
|
368 | 368 | "name": "punctuation.definition.symbol.end.ruby" |
369 | 369 | } |
370 | 370 | }, |
371 | | - "name": "constant.other.symbol.ruby", |
| 371 | + "name": "constant.language.symbol.ruby", |
372 | 372 | "patterns": [ |
373 | 373 | { |
374 | 374 | "match": "\\\\['\\\\]", |
|
390 | 390 | "name": "punctuation.section.symbol.end.ruby" |
391 | 391 | } |
392 | 392 | }, |
393 | | - "name": "constant.other.symbol.interpolated.ruby", |
| 393 | + "name": "constant.language.symbol.interpolated.ruby", |
394 | 394 | "patterns": [ |
395 | 395 | { |
396 | 396 | "include": "#interpolated_ruby" |
|
619 | 619 | "name": "punctuation.section.array.end.ruby" |
620 | 620 | } |
621 | 621 | }, |
622 | | - "name": "constant.other.symbol.interpolated.ruby", |
| 622 | + "name": "constant.language.symbol.interpolated.ruby", |
623 | 623 | "patterns": [ |
624 | 624 | { |
625 | 625 | "include": "#interpolated_ruby" |
|
645 | 645 | "name": "punctuation.section.array.end.ruby" |
646 | 646 | } |
647 | 647 | }, |
648 | | - "name": "constant.other.symbol.interpolated.ruby", |
| 648 | + "name": "constant.language.symbol.interpolated.ruby", |
649 | 649 | "patterns": [ |
650 | 650 | { |
651 | 651 | "include": "#interpolated_ruby" |
|
671 | 671 | "name": "punctuation.section.array.end.ruby" |
672 | 672 | } |
673 | 673 | }, |
674 | | - "name": "constant.other.symbol.interpolated.ruby", |
| 674 | + "name": "constant.language.symbol.interpolated.ruby", |
675 | 675 | "patterns": [ |
676 | 676 | { |
677 | 677 | "include": "#interpolated_ruby" |
|
697 | 697 | "name": "punctuation.section.array.end.ruby" |
698 | 698 | } |
699 | 699 | }, |
700 | | - "name": "constant.other.symbol.interpolated.ruby", |
| 700 | + "name": "constant.language.symbol.interpolated.ruby", |
701 | 701 | "patterns": [ |
702 | 702 | { |
703 | 703 | "include": "#interpolated_ruby" |
|
723 | 723 | "name": "punctuation.section.array.end.ruby" |
724 | 724 | } |
725 | 725 | }, |
726 | | - "name": "constant.other.symbol.interpolated.ruby", |
| 726 | + "name": "constant.language.symbol.interpolated.ruby", |
727 | 727 | "patterns": [ |
728 | 728 | { |
729 | 729 | "include": "#interpolated_ruby" |
|
746 | 746 | "name": "punctuation.section.array.end.ruby" |
747 | 747 | } |
748 | 748 | }, |
749 | | - "name": "constant.other.symbol.ruby", |
| 749 | + "name": "constant.language.symbol.ruby", |
750 | 750 | "patterns": [ |
751 | 751 | { |
752 | 752 | "match": "\\\\]|\\\\\\\\", |
|
770 | 770 | "name": "punctuation.section.array.end.ruby" |
771 | 771 | } |
772 | 772 | }, |
773 | | - "name": "constant.other.symbol.ruby", |
| 773 | + "name": "constant.language.symbol.ruby", |
774 | 774 | "patterns": [ |
775 | 775 | { |
776 | 776 | "match": "\\\\\\)|\\\\\\\\", |
|
794 | 794 | "name": "punctuation.section.array.end.ruby" |
795 | 795 | } |
796 | 796 | }, |
797 | | - "name": "constant.other.symbol.ruby", |
| 797 | + "name": "constant.language.symbol.ruby", |
798 | 798 | "patterns": [ |
799 | 799 | { |
800 | 800 | "match": "\\\\>|\\\\\\\\", |
|
818 | 818 | "name": "punctuation.section.array.end.ruby" |
819 | 819 | } |
820 | 820 | }, |
821 | | - "name": "constant.other.symbol.ruby", |
| 821 | + "name": "constant.language.symbol.ruby", |
822 | 822 | "patterns": [ |
823 | 823 | { |
824 | 824 | "match": "\\\\}|\\\\\\\\", |
|
842 | 842 | "name": "punctuation.section.array.end.ruby" |
843 | 843 | } |
844 | 844 | }, |
845 | | - "name": "constant.other.symbol.ruby", |
| 845 | + "name": "constant.language.symbol.ruby", |
846 | 846 | "patterns": [ |
847 | 847 | { |
848 | 848 | "comment": "Cant be named because its not neccesarily an escape.", |
|
1374 | 1374 | "name": "punctuation.definition.symbol.end.ruby" |
1375 | 1375 | } |
1376 | 1376 | }, |
1377 | | - "name": "constant.other.symbol.ruby", |
| 1377 | + "name": "constant.language.symbol.ruby", |
1378 | 1378 | "patterns": [ |
1379 | 1379 | { |
1380 | 1380 | "match": "\\\\\\)|\\\\\\\\", |
|
1398 | 1398 | "name": "punctuation.definition.symbol.end.ruby" |
1399 | 1399 | } |
1400 | 1400 | }, |
1401 | | - "name": "constant.other.symbol.ruby", |
| 1401 | + "name": "constant.language.symbol.ruby", |
1402 | 1402 | "patterns": [ |
1403 | 1403 | { |
1404 | 1404 | "match": "\\\\>|\\\\\\\\", |
|
1422 | 1422 | "name": "punctuation.definition.symbol.end.ruby" |
1423 | 1423 | } |
1424 | 1424 | }, |
1425 | | - "name": "constant.other.symbol.ruby", |
| 1425 | + "name": "constant.language.symbol.ruby", |
1426 | 1426 | "patterns": [ |
1427 | 1427 | { |
1428 | 1428 | "match": "\\\\]|\\\\\\\\", |
|
1446 | 1446 | "name": "punctuation.definition.symbol.end.ruby" |
1447 | 1447 | } |
1448 | 1448 | }, |
1449 | | - "name": "constant.other.symbol.ruby", |
| 1449 | + "name": "constant.language.symbol.ruby", |
1450 | 1450 | "patterns": [ |
1451 | 1451 | { |
1452 | 1452 | "match": "\\\\}|\\\\\\\\", |
|
1470 | 1470 | "name": "punctuation.definition.symbol.end.ruby" |
1471 | 1471 | } |
1472 | 1472 | }, |
1473 | | - "name": "constant.other.symbol.ruby", |
| 1473 | + "name": "constant.language.symbol.ruby", |
1474 | 1474 | "patterns": [ |
1475 | 1475 | { |
1476 | 1476 | "comment": "Cant be named because its not neccesarily an escape.", |
|
1486 | 1486 | }, |
1487 | 1487 | "comment": "symbols", |
1488 | 1488 | "match": "(?x)\n(?<!:)(:)\n(?>\n [$a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?\n |\n ===?|<=>|>[>=]?|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n |\n @@?[a-zA-Z_]\\w*\n)", |
1489 | | - "name": "constant.other.symbol.ruby" |
| 1489 | + "name": "constant.language.symbol.ruby" |
1490 | 1490 | }, |
1491 | 1491 | { |
1492 | 1492 | "begin": "^=begin", |
|
2179 | 2179 | { |
2180 | 2180 | "match": "\\(|\\)", |
2181 | 2181 | "name": "punctuation.section.function.ruby" |
| 2182 | + }, |
| 2183 | + { |
| 2184 | + "begin": "(?=[a-zA-Z0-9_!?]+\\()", |
| 2185 | + "end": "(?<=\\))", |
| 2186 | + "name": "meta.function-call.ruby", |
| 2187 | + "patterns": [ |
| 2188 | + { |
| 2189 | + "include": "#nest_function_parens" |
| 2190 | + }, |
| 2191 | + { |
| 2192 | + "include": "#known_function_names" |
| 2193 | + }, |
| 2194 | + { |
| 2195 | + "match": "([a-zA-Z0-9_!?]+)(?=\\()", |
| 2196 | + "name": "entity.name.function.ruby" |
| 2197 | + }, |
| 2198 | + { |
| 2199 | + "include": "$self" |
| 2200 | + } |
| 2201 | + ] |
| 2202 | + }, |
| 2203 | + { |
| 2204 | + "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", |
| 2205 | + "match": "((?<=\\W)\\b|^)\\w+\\b(?=\\s*([\\]\\)\\}\\=\\+\\-\\*\\/\\^\\$\\,\\.]|<\\s|<<[\\s|\\.]))", |
| 2206 | + "name": "variable.other.ruby" |
2182 | 2207 | } |
2183 | 2208 | ], |
2184 | 2209 | "repository": { |
|
0 commit comments