Ignore context in Debug format for AST
This commit is contained in:
parent
e643ebe114
commit
14aa7c242a
@ -7,7 +7,7 @@ pub use statement::*;
|
||||
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
fmt::{self, Display, Formatter},
|
||||
fmt::{self, Debug, Display, Formatter},
|
||||
num::TryFromIntError,
|
||||
};
|
||||
|
||||
@ -18,7 +18,7 @@ use crate::{Context, ContextError};
|
||||
pub type Span = (usize, usize);
|
||||
|
||||
/// In-memory representation of a Dust program.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct AbstractSyntaxTree {
|
||||
pub statements: VecDeque<Statement>,
|
||||
|
||||
@ -26,6 +26,14 @@ pub struct AbstractSyntaxTree {
|
||||
pub context: Context,
|
||||
}
|
||||
|
||||
impl Debug for AbstractSyntaxTree {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
f.debug_struct("AbstractSyntaxTree")
|
||||
.field("statements", &self.statements)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for AbstractSyntaxTree {}
|
||||
|
||||
impl PartialEq for AbstractSyntaxTree {
|
||||
|
Loading…
Reference in New Issue
Block a user