summaryrefslogtreecommitdiff
path: root/examples/03-inductive-data-types
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-14 19:49:24 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-14 19:49:24 +0100
commitf189d982951f7f0e2c3560a20c0d1d8a2b6431d0 (patch)
tree2c369ef2467f91aaa1a03071998831d0f84e6e7b /examples/03-inductive-data-types
parent0e51a1497b98bd190d304acc4c1e1e1f56bf03c7 (diff)
Derive Debug and PartialEq for generated Rust types
Diffstat (limited to 'examples/03-inductive-data-types')
-rw-r--r--examples/03-inductive-data-types/output/rust/src/arithmetic.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/03-inductive-data-types/output/rust/src/arithmetic.rs b/examples/03-inductive-data-types/output/rust/src/arithmetic.rs
index ac7c740..c9ea28d 100644
--- a/examples/03-inductive-data-types/output/rust/src/arithmetic.rs
+++ b/examples/03-inductive-data-types/output/rust/src/arithmetic.rs
@@ -1,5 +1,6 @@
// Generated by hobgoblin.
+#[derive(Debug, PartialEq)]
pub enum Expression {
Add(::std::boxed::Box<crate::arithmetic::Add>),
Const(crate::arithmetic::Const),
@@ -17,11 +18,13 @@ impl ::std::convert::From<crate::arithmetic::Const> for crate::arithmetic::Expre
}
}
+#[derive(Debug, PartialEq)]
pub struct Add {
pub left: crate::arithmetic::Expression,
pub right: crate::arithmetic::Expression,
}
+#[derive(Debug, PartialEq)]
pub struct Const {
pub value: ::core::primitive::i32,
}