Merge #6447
6447: Textmate grammar: allow function declarations without curly brackets r=lnicola a=dustypomerleau Functions inside trait declarations can break subsequent highlighting, because they have no curly brackets. In a case such as: ```rust pub trait Summary { fn summarize(&self) -> String; } ``` the scope `meta.function.definition.rust` will continue past the end of the block looking for `{` after `fn`. This PR allows `meta.function.definition.rust` to terminate with `;` in these cases. Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
This commit is contained in:
commit
658e97a39e
1 changed files with 1 additions and 1 deletions
|
@ -462,7 +462,7 @@
|
||||||
"name": "punctuation.brackets.angle.rust"
|
"name": "punctuation.brackets.angle.rust"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"end": "\\{",
|
"end": "\\{|;",
|
||||||
"endCaptures": {
|
"endCaptures": {
|
||||||
"0": {
|
"0": {
|
||||||
"name": "punctuation.brackets.curly.rust"
|
"name": "punctuation.brackets.curly.rust"
|
||||||
|
|
Loading…
Reference in a new issue