aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/rust.tmGrammar.json18
1 files changed, 9 insertions, 9 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index 77595aa00..608a3354e 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -50,7 +50,7 @@
50 { 50 {
51 "comment": "macro type metavariables", 51 "comment": "macro type metavariables",
52 "name": "meta.macro.metavariable.type.rust", 52 "name": "meta.macro.metavariable.type.rust",
53 "match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|pat|path|stmt|tt|ty|vis))?", 53 "match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
54 "captures": { 54 "captures": {
55 "1": { 55 "1": {
56 "name": "keyword.operator.macro.dollar.rust" 56 "name": "keyword.operator.macro.dollar.rust"
@@ -77,7 +77,7 @@
77 { 77 {
78 "comment": "macro metavariables", 78 "comment": "macro metavariables",
79 "name": "meta.macro.metavariable.rust", 79 "name": "meta.macro.metavariable.rust",
80 "match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|pat|path|stmt|tt|ty|vis))?", 80 "match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
81 "captures": { 81 "captures": {
82 "1": { 82 "1": {
83 "name": "keyword.operator.macro.dollar.rust" 83 "name": "keyword.operator.macro.dollar.rust"
@@ -676,11 +676,6 @@
676 "match": "\\bmut\\b" 676 "match": "\\bmut\\b"
677 }, 677 },
678 { 678 {
679 "comment": "math operators",
680 "name": "keyword.operator.math.rust",
681 "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
682 },
683 {
684 "comment": "logical operators", 679 "comment": "logical operators",
685 "name": "keyword.operator.logical.rust", 680 "name": "keyword.operator.logical.rust",
686 "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)" 681 "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)"
@@ -693,7 +688,7 @@
693 { 688 {
694 "comment": "assignment operators", 689 "comment": "assignment operators",
695 "name": "keyword.operator.assignment.rust", 690 "name": "keyword.operator.assignment.rust",
696 "match": "(-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)" 691 "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)"
697 }, 692 },
698 { 693 {
699 "comment": "single equal", 694 "comment": "single equal",
@@ -706,6 +701,11 @@
706 "match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)" 701 "match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)"
707 }, 702 },
708 { 703 {
704 "comment": "math operators",
705 "name": "keyword.operator.math.rust",
706 "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
707 },
708 {
709 "comment": "less than, greater than (special case)", 709 "comment": "less than, greater than (special case)",
710 "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))", 710 "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))",
711 "captures": { 711 "captures": {
@@ -1127,7 +1127,7 @@
1127 { 1127 {
1128 "comment": "variables", 1128 "comment": "variables",
1129 "name": "variable.other.rust", 1129 "name": "variable.other.rust",
1130 "match": "\\b(?<!\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b" 1130 "match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"
1131 } 1131 }
1132 ] 1132 ]
1133 } 1133 }