diff options
author | 2021-05-01 01:28:40 -0700 | |
---|---|---|
committer | 2021-05-01 01:28:40 -0700 | |
commit | 3050d5a1a4def6fe90b62854e2252e308f5f708a (patch) | |
tree | 508eb5c8033779b92650f6d129251c1b9a5199b8 /src/ast | |
parent | 7005f4c43c8fa403b85f14afcf4c9b5a4c8c4cbc (diff) | |
download | bun-3050d5a1a4def6fe90b62854e2252e308f5f708a.tar.gz bun-3050d5a1a4def6fe90b62854e2252e308f5f708a.tar.zst bun-3050d5a1a4def6fe90b62854e2252e308f5f708a.zip |
Assorted bugfixes but the next step really is porting tests and fixing
Former-commit-id: f59ec8d6c0c95217c1dc24e2ed2dc49aed122a68
Diffstat (limited to 'src/ast')
-rw-r--r-- | src/ast/base.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ast/base.zig b/src/ast/base.zig index 1b2e3f087..3889cd743 100644 --- a/src/ast/base.zig +++ b/src/ast/base.zig @@ -44,6 +44,10 @@ pub const Ref = packed struct { pub fn eql(ref: Ref, b: Ref) bool { return ref.inner_index == b.inner_index and ref.source_index == b.source_index; } + + pub fn jsonStringify(self: *const Ref, options: anytype, writer: anytype) !void { + return try std.json.stringify([2]u32{ self.source_index, self.inner_index }, options, writer); + } }; // This is kind of the wrong place, but it's shared between files |