From 6527d31dfba78330a39e52d7772f6c8561fb23ef Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 13 Jan 2020 13:02:33 +0100 Subject: =?UTF-8?q?Merge=20Characters=20struct=20into=20tokenizer=20?= =?UTF-8?q?=F0=9F=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/expr.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/syntax/expr.rs') diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs index a1680861..ed5e50df 100644 --- a/src/syntax/expr.rs +++ b/src/syntax/expr.rs @@ -166,27 +166,6 @@ impl Display for Ident { debug_display!(Ident); -/// Whether this word is a valid identifier. -pub fn is_identifier(string: &str) -> bool { - let mut chars = string.chars(); - - match chars.next() { - Some('-') => {} - Some(c) if UnicodeXID::is_xid_start(c) => {} - _ => return false, - } - - while let Some(c) = chars.next() { - match c { - '.' | '-' => {} - c if UnicodeXID::is_xid_continue(c) => {} - _ => return false, - } - } - - true -} - /// Kinds of expressions. pub trait ExpressionKind: Sized { const NAME: &'static str; -- cgit v1.2.3