Skip to content

Commit 9afec89

Browse files
bors[bot]ehuss
andcommitted
Merge #364
364: Syntax: Fix bad match for break and continue. r=ehuss a=ehuss Co-authored-by: Eric Huss <[email protected]>
2 parents ea4ab33 + 6999afa commit 9afec89

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
@@ -122,7 +122,7 @@ contexts:
122122
2: storage.modifier.rust
123123
3: entity.name.constant.rust
124124

125-
- match: '\b(break|continue)(?:\s+(''{{non_raw_ident}}))?'
125+
- match: '\b(break|continue)\b(?:\s+(''{{non_raw_ident}}))?'
126126
captures:
127127
1: keyword.control.rust
128128
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)