diff --git a/RustEnhanced.sublime-syntax b/RustEnhanced.sublime-syntax index 797e238b..5f922d0e 100644 --- a/RustEnhanced.sublime-syntax +++ b/RustEnhanced.sublime-syntax @@ -215,7 +215,7 @@ contexts: scope: keyword.operator.rust push: after-operator - - match: '=' + - match: '=(?!=)' scope: keyword.operator.rust push: after-operator @@ -226,7 +226,22 @@ contexts: scope: punctuation.separator.rust push: after-operator - - match: '\.\.\.|\.\.||[-=<>&|!~@?+*/%^''#$]|\b_\b' + - match: '\.\.\.' + scope: keyword.operator.rust + + - match: '\.\.' + scope: keyword.operator.rust + + - match: '<<=|>>=|<<|>>' + scope: keyword.operator.rust + + - match: '>=|<=|==|!=|&&|\|\|' + scope: keyword.operator.rust + + - match: '\*=|/=|+=|-=|%=|\^=' + scope: keyword.operator.rust + + - match: '[-=<>&|!~@?+*/%^''#$]' scope: keyword.operator.rust attribute: diff --git a/syntax_test_rust.rs b/syntax_test_rust.rs index 1d7b4464..089185f6 100644 --- a/syntax_test_rust.rs +++ b/syntax_test_rust.rs @@ -502,7 +502,7 @@ let o = match n { // ^^ keyword.operator // ^^^^^^^ string.quoted.double _ => "lots", -// ^ keyword.operator +// ^ source.rust // ^^ keyword.operator }; @@ -574,7 +574,7 @@ match my_func() { // ^^^ keyword.operator // ^^ constant.other.placeholder _ => println!("Full number"), -// ^ keyword.operator +// ^ source.rust // ^^ keyword.operator } // <- meta.block punctuation.definition.block.end