diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-07-26 19:14:23 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-07-26 19:14:23 +0200 |
| commit | 9f400042cbb8aef7fa9b77b080f15a3701abf7a9 (patch) | |
| tree | 68d407c0b90dfe2c636d4000976556b97ce159e8 /src/syntax/expr.rs | |
| parent | ea64ce9aeba411c7dc2f75f39a41935718d03122 (diff) | |
Streamline parser and tokenizer test code ✈
Diffstat (limited to 'src/syntax/expr.rs')
| -rw-r--r-- | src/syntax/expr.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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<S>(ident: S) -> Option<Ident> where S: AsRef<str> + Into<String> { if is_identifier(ident.as_ref()) { Some(Ident(ident.into())) |
