aboutsummaryrefslogtreecommitdiff
path: root/src/js_ast.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-20 23:57:26 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-20 23:57:44 -0700
commit541d16f8bed5f51a9861419d7273e733dae56549 (patch)
tree835e524ed78722ffcfb80c5e4227992a704aa3dc /src/js_ast.zig
parentb609f9be2894f5237a0d058eaea884f330f02f77 (diff)
downloadbun-541d16f8bed5f51a9861419d7273e733dae56549.tar.gz
bun-541d16f8bed5f51a9861419d7273e733dae56549.tar.zst
bun-541d16f8bed5f51a9861419d7273e733dae56549.zip
Fix bug with merging adjacent vars
Diffstat (limited to 'src/js_ast.zig')
-rw-r--r--src/js_ast.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js_ast.zig b/src/js_ast.zig
index 2f0d8ddd6..dbd0fb010 100644
--- a/src/js_ast.zig
+++ b/src/js_ast.zig
@@ -5269,6 +5269,11 @@ pub const S = struct {
was_commonjs_export: bool = false,
+ pub fn canMergeWith(this: *const Local, other: *const Local) bool {
+ return this.kind == other.kind and this.is_export == other.is_export and
+ this.was_commonjs_export == other.was_commonjs_export;
+ }
+
pub const Kind = enum(u2) {
k_var,
k_let,