From abb353fe00800e29a46682b28e78e0776290d913 Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Tue, 11 Mar 2025 08:30:48 +0800 Subject: [PATCH] Add quote for PEG_TRACE Cached --- peg-macros/translate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peg-macros/translate.rs b/peg-macros/translate.rs index e80b469..326fa53 100644 --- a/peg-macros/translate.rs +++ b/peg-macros/translate.rs @@ -267,8 +267,8 @@ fn compile_rule(context: &Context, rule: &Rule) -> TokenStream { quote_spanned! { span => let loc = ::peg::Parse::position_repr(__input, __pos); match &entry { - &::peg::RuleResult::Matched(..) => println!("[PEG_TRACE] Cached match of rule {} at {}", #str_rule_name, loc), - &Failed => println!("[PEG_TRACE] Cached fail of rule {} at {}", #str_rule_name, loc), + &::peg::RuleResult::Matched(..) => println!("[PEG_TRACE] Cached match of rule `{}` at {}", #str_rule_name, loc), + &Failed => println!("[PEG_TRACE] Cached fail of rule `{}` at {}", #str_rule_name, loc), }; } } else {