Skip to content

Commit a4517ae

Browse files
committed
Syntax: Abort on invalid struct syntax.
This helps with macros which use funky syntax.
1 parent 1fb301b commit a4517ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

RustEnhanced.sublime-syntax

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,9 @@ contexts:
611611
- match: '\{'
612612
scope: punctuation.definition.block.begin.rust
613613
push: struct-classic-body
614+
- match: '(?=\S)'
615+
# Abort for an invalid match.
616+
pop: true
614617

615618
struct-classic-body:
616619
- meta_scope: meta.block.rust
@@ -628,7 +631,9 @@ contexts:
628631
- match: ':'
629632
scope: punctuation.separator.rust
630633
- include: type-any-identifier
631-
634+
- match: '(?=\S)'
635+
# Abort for an invalid match.
636+
pop: true
632637

633638
union-identifier:
634639
- meta_scope: meta.union.rust

0 commit comments

Comments
 (0)