Skip to content

Commit a53b51b

Browse files
committed
feat: $$TRACE$$
1 parent 2b59956 commit a53b51b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎crates/jsshaker/src/builtins/globals/constants.rs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,19 @@ impl Builtins<'_> {
9898

9999
// Debug helper (non-standard)
100100
"$$DEBUG$$" => factory.implemented_builtin_fn(
101-
"debug",
101+
"$$DEBUG$$",
102102
|analyzer, _dep, _this, args| {
103103
println!("Debug: {:#?}", args.get(analyzer, 0));
104104
analyzer.factory.undefined
105105
},
106106
),
107+
"$$TRACE$$" => factory.implemented_builtin_fn(
108+
"$$TRACE$$",
109+
|analyzer, _dep, _this, args| {
110+
println!("Trace: {:#?}", args.get(analyzer, 0).get_literal(analyzer).unwrap().to_string(analyzer.allocator));
111+
analyzer.factory.undefined
112+
},
113+
),
107114
})
108115
}
109116
}

0 commit comments

Comments
 (0)