Skip to content

Commit

Permalink
Syntax: Abort on invalid struct syntax.
Browse files Browse the repository at this point in the history
This helps with macros which use funky syntax.
  • Loading branch information
ehuss committed Feb 5, 2019
1 parent 1fb301b commit a4517ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion RustEnhanced.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ contexts:
- match: '\{'
scope: punctuation.definition.block.begin.rust
push: struct-classic-body
- match: '(?=\S)'
# Abort for an invalid match.
pop: true

struct-classic-body:
- meta_scope: meta.block.rust
Expand All @@ -628,7 +631,9 @@ contexts:
- match: ':'
scope: punctuation.separator.rust
- include: type-any-identifier

- match: '(?=\S)'
# Abort for an invalid match.
pop: true

union-identifier:
- meta_scope: meta.union.rust
Expand Down

0 comments on commit a4517ae

Please sign in to comment.