Skip to content

Commit

Permalink
Merge pull request #419 from ehuss/syntax-enum-recovery
Browse files Browse the repository at this point in the history
Syntax: Recover on bad enum syntax.
  • Loading branch information
ehuss authored Dec 13, 2019
2 parents 0b9756f + c1db6fc commit be113dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions RustEnhanced.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@ contexts:
- match: '{{identifier}}'
scope: entity.name.enum.rust
set: enum-maybe-where
- match: '(?=\S)'
# Abort on invalid character.
pop: true

enum-maybe-where:
- meta_scope: meta.enum.rust
Expand All @@ -693,6 +696,9 @@ contexts:
- match: '\{'
scope: punctuation.definition.block.begin.rust
set: enum-body
- match: '(?=\S)'
# Abort on invalid character.
pop: true

enum-body:
- meta_scope: meta.enum.rust
Expand Down

0 comments on commit be113dd

Please sign in to comment.