fix: prevent line comments inside block comments
prevent line comments inside block comments
prevent underscore-prefixed functions and macros from receiving comment scope
}
},
"patterns": [
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
}
},
"patterns": [
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
}
},
"patterns": [
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
}
]
},
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
{
"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": [
+ "match": "\\s*//.*"
+ },
{
- "include": "#comments"
+ "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",
"end": "\\*/",
"patterns": [
{
- "include": "#comments"
+ "include": "#block-comments"
}
]
},
"end": "\\*/",
"patterns": [
{
- "include": "#comments"
+ "include": "#block-comments"
}
]
- },
- {
- "comment": "inferred types, wildcard patterns, ignored params",
- "name": "comment.char.underscore.rust",
- "match": "\\b_\\w*\\b"
}
]
},
}
},
"patterns": [
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
}
},
"patterns": [
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
}
},
"patterns": [
+ {
+ "include": "#block-comments"
+ },
{
"include": "#comments"
},
