summaryrefslogtreecommitdiff
path: root/src/syntax/expr.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-01-13 13:02:33 +0100
committerLaurenz <laurmaedje@gmail.com>2020-01-13 13:02:33 +0100
commit6527d31dfba78330a39e52d7772f6c8561fb23ef (patch)
tree0c0640ce40d14662d21bc0cac61af4caca03f237 /src/syntax/expr.rs
parenta8f711d49ad65ee08c96fae2a8b52873667bdf5c (diff)
Merge Characters struct into tokenizer 🔀
Diffstat (limited to 'src/syntax/expr.rs')
-rw-r--r--src/syntax/expr.rs21
1 files changed, 0 insertions, 21 deletions
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;