Skip to content

Commit

Permalink
[Rust] Add pat_param macro fragment specifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed May 1, 2021
1 parent 77bdc18 commit 21c26ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Rust/Rust.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ contexts:
pop: true
- include: macro-matchers

- match: '(\$\s*{{identifier}})\s*(:)\s*(ident|path|expr|ty|pat|stmt|block|item|meta|tt|lifetime|vis|literal)'
- match: '(\$\s*{{identifier}})\s*(:)\s*(ident|path|expr|ty|pat_param|pat|stmt|block|item|meta|tt|lifetime|vis|literal)'
captures:
1: variable.parameter.rust
2: punctuation.separator.rust
Expand Down
3 changes: 3 additions & 0 deletions Rust/tests/syntax_test_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ macro_rules! designators {
$p:pat,
// ^^ variable.parameter
// ^^^ storage.type
$pp:pat_param,
// ^^^ variable.parameter
// ^^^^^^^^^ storage.type
$e:expr,
// ^^ variable.parameter
// ^^^^ storage.type
Expand Down

0 comments on commit 21c26ba

Please sign in to comment.