summaryrefslogtreecommitdiff
path: root/examples/12-inductive-data-types
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-09-04 15:22:06 +0100
committerMichael Williamson <mike@zwobble.org>2026-09-04 15:25:14 +0100
commit94ca8de6bc11f194bdf3a0415aad2eb66e222c45 (patch)
tree691279348a97897379c03d8c5f66ea63333babb1 /examples/12-inductive-data-types
parent8b1ee9a26a378a4456e800be314ab765be94b368 (diff)
Add custom code to TypeScript output
Diffstat (limited to 'examples/12-inductive-data-types')
-rw-r--r--examples/12-inductive-data-types/output/typescript/src/arithmetic.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts b/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts
index 9599968..486ac66 100644
--- a/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts
+++ b/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts
@@ -1,5 +1,8 @@
// Generated by hobgoblin.
+// Custom area start: imports
+// Custom area end: imports
+
type Expression = Add | Const;
export {type Expression};
@@ -17,6 +20,9 @@ class Add {
this.left = left;
this.right = right;
}
+
+ // Custom area start: Add, body
+ // Custom area end: Add, body
}
export {Add};
@@ -31,6 +37,12 @@ class Const {
public constructor(value: number) {
this.value = value;
}
+
+ // Custom area start: Const, body
+ // Custom area end: Const, body
}
export {Const};
+
+// Custom area start: body
+// Custom area end: body