From 9f400042cbb8aef7fa9b77b080f15a3701abf7a9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 26 Jul 2020 19:14:23 +0200 Subject: =?UTF-8?q?Streamline=20parser=20and=20tokenizer=20test=20code=20?= =?UTF-8?q?=E2=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/expr.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/syntax/expr.rs') diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs index a27bdb62..a1b3fd62 100644 --- a/src/syntax/expr.rs +++ b/src/syntax/expr.rs @@ -93,9 +93,6 @@ impl Debug for Expr { /// A unicode identifier. /// -/// The identifier must be valid! This is checked in [`Ident::new`] or -/// [`is_identifier`]. -/// /// # Example /// ```typst /// [func: "hi", ident] @@ -105,7 +102,8 @@ impl Debug for Expr { pub struct Ident(pub String); impl Ident { - /// Create a new identifier from a string checking that it is valid. + /// Create a new identifier from a string checking that it is a valid + /// unicode identifier. pub fn new(ident: S) -> Option where S: AsRef + Into { if is_identifier(ident.as_ref()) { Some(Ident(ident.into())) -- cgit v1.2.3