From 8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9 Mon Sep 17 00:00:00 2001 From: Cormac Relf Date: Tue, 18 Oct 2022 13:02:22 +0200 Subject: highlights(rust): panic!() and assert!() as @exception --- queries/rust/highlights.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm index 3df682c3..01a62773 100644 --- a/queries/rust/highlights.scm +++ b/queries/rust/highlights.scm @@ -273,3 +273,8 @@ (inner_attribute_item ["!" "#"] @punctuation.special) (macro_invocation "!" @function.macro) (empty_type "!" @type.builtin) + +(macro_invocation macro: (identifier) @_ident @exception "!" @exception + (#eq? @_ident "panic")) +(macro_invocation macro: (identifier) @_ident @exception "!" @exception + (#contains? @_ident "assert")) -- cgit v1.2.3