forked from Orchid/orchid
New macro system and stdlib additions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
use std::num::NonZeroU64;
|
||||
use std::ops::Range;
|
||||
use std::rc::Rc;
|
||||
@@ -56,6 +57,15 @@ pub enum Paren {
|
||||
Square,
|
||||
Curly,
|
||||
}
|
||||
impl fmt::Display for Paren {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", match self {
|
||||
Self::Round => "()",
|
||||
Self::Curly => "{}",
|
||||
Self::Square => "[]",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Coding)]
|
||||
pub struct TreeId(pub NonZeroU64);
|
||||
|
||||
Reference in New Issue
Block a user