make Expression Display using original string
This commit is contained in:
parent
b7933c966e
commit
bbf182f762
2 changed files with 8 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "bliplib"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
edition = "2024"
|
||||
authors = ["Breval Ferrari <breval.ferrari@fish.golf>"]
|
||||
description = "The Bizarre Language for Intermodulation Programming (BLIP)"
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{
|
|||
any::{Any, TypeId, type_name},
|
||||
collections::BTreeMap,
|
||||
f64,
|
||||
fmt::Debug,
|
||||
fmt::{Debug, Display},
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
|
@ -289,6 +289,12 @@ impl FromStr for Expression {
|
|||
}
|
||||
}
|
||||
|
||||
impl Display for Expression {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
Display::fmt(&self.from, f)
|
||||
}
|
||||
}
|
||||
|
||||
/// Compiler context which persists from one token to the other.
|
||||
#[derive(Debug, Clone, new)]
|
||||
#[cfg_attr(test, derive(PartialEq))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue