summaryrefslogtreecommitdiff
path: root/src/ast/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/mod.rs')
-rw-r--r--src/ast/mod.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/ast/mod.rs b/src/ast/mod.rs
index bbd7d1d..09b89e7 100644
--- a/src/ast/mod.rs
+++ b/src/ast/mod.rs
@@ -30,16 +30,7 @@ fn fix<R: PartialEq, F: FnMut(&R) -> R>(init: R, mut step: F) -> R {
res
}
-#[derive(Copy, Clone, Debug)]
-pub struct Epsilon {
- span: Span,
-}
-
-impl Epsilon {
- pub fn new(span: Span) -> Self {
- Self { span }
- }
-}
+pub type Epsilon = Token![_];
impl Type for Epsilon {
type Err = Never;
@@ -826,7 +817,7 @@ impl TypeKind {
impl Display for TypeKind {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
- Self::Epsilon => write!(f, "()"),
+ Self::Epsilon => write!(f, "_"),
Self::Literal(s) => write!(f, "{:?}", s),
Self::Cat(fst, snd) => write!(f, "{}.{}", fst, snd),
Self::Alt(left, right) => write!(f, "({} | {})", left, right),