diff options
Diffstat (limited to 'editors/code/rust.tmGrammar.json')
| -rw-r--r-- | editors/code/rust.tmGrammar.json | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index 3be56519511..f0c5c3cf314 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json @@ -25,6 +25,9 @@ }, "patterns": [ { + "include": "#block-comments" + }, + { "include": "#comments" }, { @@ -185,6 +188,9 @@ }, "patterns": [ { + "include": "#block-comments" + }, + { "include": "#comments" }, { @@ -212,6 +218,9 @@ }, "patterns": [ { + "include": "#block-comments" + }, + { "include": "#comments" }, { @@ -232,6 +241,9 @@ ] }, { + "include": "#block-comments" + }, + { "include": "#comments" }, { @@ -277,31 +289,30 @@ { "comment": "documentation comments", "name": "comment.line.documentation.rust", - "match": "^\\s*///.*", - "patterns": [ - { - "include": "#comments" - } - ] + "match": "^\\s*///.*" }, { "comment": "line comments", "name": "comment.line.double-slash.rust", - "match": "\\s*//.*", - "patterns": [ - { - "include": "#comments" - } - ] + "match": "\\s*//.*" }, { + "comment": "inferred types, wildcard patterns, ignored params", + "name": "comment.char.underscore.rust", + "match": "\\b_\\w*\\b[^!(]" + } + ] + }, + "block-comments": { + "patterns": [ + { "comment": "block comments", "name": "comment.block.rust", "begin": "/\\*(?!\\*)", "end": "\\*/", "patterns": [ { - "include": "#comments" + "include": "#block-comments" } ] }, @@ -312,14 +323,9 @@ "end": "\\*/", "patterns": [ { - "include": "#comments" + "include": "#block-comments" } ] - }, - { - "comment": "inferred types, wildcard patterns, ignored params", - "name": "comment.char.underscore.rust", - "match": "\\b_\\w*\\b" } ] }, @@ -451,6 +457,9 @@ }, "patterns": [ { + "include": "#block-comments" + }, + { "include": "#comments" }, { @@ -517,6 +526,9 @@ }, "patterns": [ { + "include": "#block-comments" + }, + { "include": "#comments" }, { @@ -798,6 +810,9 @@ }, "patterns": [ { + "include": "#block-comments" + }, + { "include": "#comments" }, { |
