From bc8b848aba0d2efe39c4cbbf339d6808f6cd2c85 Mon Sep 17 00:00:00 2001 From: TcMits Date: Tue, 2 Sep 2025 18:43:12 +0700 Subject: [PATCH] docs --- macros/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/macros/src/lib.rs b/macros/src/lib.rs index ffc39282a..4269ffd1c 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -440,6 +440,15 @@ pub fn derive_vfs_module(input: TokenStream) -> TokenStream { ext::derive_vfs_module(input) } +/// match_ignore_ascii_case will generate trie-like tree matching from normal match expression. +/// example: +/// ```ignore +/// match_ignore_ascii_case!(match input { +/// b"AB" => TokenType::TK_ABORT, +/// b"AC" => TokenType::TK_ACTION, +/// _ => TokenType::TK_ID, +/// }) +/// ``` #[proc_macro] pub fn match_ignore_ascii_case(input: TokenStream) -> TokenStream { ext::match_ignore_ascci_case(input)