Skip to content

Commit be113dd

Browse files
authored
Merge pull request #419 from ehuss/syntax-enum-recovery
Syntax: Recover on bad enum syntax.
2 parents 0b9756f + c1db6fc commit be113dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

RustEnhanced.sublime-syntax

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@ contexts:
684684
- match: '{{identifier}}'
685685
scope: entity.name.enum.rust
686686
set: enum-maybe-where
687+
- match: '(?=\S)'
688+
# Abort on invalid character.
689+
pop: true
687690

688691
enum-maybe-where:
689692
- meta_scope: meta.enum.rust
@@ -693,6 +696,9 @@ contexts:
693696
- match: '\{'
694697
scope: punctuation.definition.block.begin.rust
695698
set: enum-body
699+
- match: '(?=\S)'
700+
# Abort on invalid character.
701+
pop: true
696702

697703
enum-body:
698704
- meta_scope: meta.enum.rust

0 commit comments

Comments
 (0)