Skip to content

Commit 6999afa

Browse files
committed
Syntax: Fix bad match for break and continue.
1 parent 8f13f78 commit 6999afa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

RustEnhanced.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ contexts:
117117
2: storage.modifier.rust
118118
3: entity.name.constant.rust
119119

120-
- match: '\b(break|continue)(?:\s+(''{{non_raw_ident}}))?'
120+
- match: '\b(break|continue)\b(?:\s+(''{{non_raw_ident}}))?'
121121
captures:
122122
1: keyword.control.rust
123123
2: entity.name.label.rust

tests/syntax-rust/syntax_test_control_flow.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,8 @@ while let BasicStruct(k) = j {
9090
}
9191
}
9292
// <- meta.block punctuation.definition.block.end
93+
94+
continue_running();
95+
//^^^^^^^^^^^^^^ support.function
96+
break_things();
97+
//^^^^^^^^^^ support.function

0 commit comments

Comments
 (0)