From 1d8e2b373b5e347a89f05e36c73b04487e04bead Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 11 Oct 2022 14:06:50 +0200 Subject: Refactor some hidden internals --- src/util/identifier.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util/identifier.rs') diff --git a/src/util/identifier.rs b/src/util/identifier.rs index 4887e02..3c47e20 100644 --- a/src/util/identifier.rs +++ b/src/util/identifier.rs @@ -3,11 +3,13 @@ use unicode_id::UnicodeID; /// Check if a character can start a JS identifier. +#[must_use] pub fn id_start(char: char) -> bool { UnicodeID::is_id_start(char) || matches!(char, '$' | '_') } /// Check if a character can continue a JS (or JSX) identifier. +#[must_use] pub fn id_cont(char: char, jsx: bool) -> bool { UnicodeID::is_id_continue(char) || matches!(char, '\u{200c}' | '\u{200d}') -- cgit