mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
@@ -1010,15 +1010,15 @@ pub const StmtsKind = enum {
|
||||
};
|
||||
|
||||
fn notimpl() noreturn {
|
||||
std.debug.panic("Not implemented yet!!", .{});
|
||||
Global.panic("Not implemented yet!!", .{});
|
||||
}
|
||||
|
||||
fn lexerpanic() noreturn {
|
||||
std.debug.panic("LexerPanic", .{});
|
||||
Global.panic("LexerPanic", .{});
|
||||
}
|
||||
|
||||
fn fail() noreturn {
|
||||
std.debug.panic("Something went wrong :cry;", .{});
|
||||
Global.panic("Something went wrong :cry;", .{});
|
||||
}
|
||||
|
||||
const ExprBindingTuple = struct { expr: ?ExprNodeIndex = null, binding: ?Binding = null, override_expr: ?ExprNodeIndex = null };
|
||||
@@ -2254,7 +2254,7 @@ pub const P = struct {
|
||||
|
||||
// Sanity-check that the scopes generated by the first and second passes match
|
||||
if (order.loc.start != loc.start or order.scope.kind != kind) {
|
||||
std.debug.print("Expected scope ({s}, {d}) in {s}, found scope ({s}, {d})", .{ kind, loc.start, p.source.path.pretty, order.scope.kind, order.loc.start });
|
||||
Output.print("Expected scope ({s}, {d}) in {s}, found scope ({s}, {d})", .{ kind, loc.start, p.source.path.pretty, order.scope.kind, order.loc.start });
|
||||
p.panic("", .{});
|
||||
}
|
||||
|
||||
@@ -4046,7 +4046,7 @@ pub const P = struct {
|
||||
}
|
||||
}
|
||||
}
|
||||
// std.debug.print("\n\nmVALUE {s}:{s}\n", .{ expr, name });
|
||||
// Output.print("\n\nmVALUE {s}:{s}\n", .{ expr, name });
|
||||
p.lexer.expectOrInsertSemicolon();
|
||||
return p.s(S.SExpr{ .value = expr }, loc);
|
||||
},
|
||||
@@ -4204,7 +4204,7 @@ pub const P = struct {
|
||||
var let_range = p.lexer.range();
|
||||
var raw = p.lexer.raw();
|
||||
if (p.lexer.token != .t_identifier or !strings.eql(raw, "let")) {
|
||||
// std.debug.print("HI", .{});
|
||||
// Output.print("HI", .{});
|
||||
return ExprOrLetStmt{ .stmt_or_expr = js_ast.StmtOrExpr{ .expr = p.parseExpr(.lowest) } };
|
||||
}
|
||||
|
||||
@@ -6653,13 +6653,13 @@ pub const P = struct {
|
||||
var stream = std.io.fixedBufferStream(&fixedBuffer);
|
||||
|
||||
p.log.print(stream.writer()) catch unreachable;
|
||||
std.debug.panic("{s}", .{fixedBuffer});
|
||||
Global.panic("{s}", .{fixedBuffer});
|
||||
}
|
||||
|
||||
pub fn _parsePrefix(p: *P, level: Level, errors: *DeferredErrors, flags: Expr.EFlags) Expr {
|
||||
const loc = p.lexer.loc();
|
||||
const l = @enumToInt(level);
|
||||
// std.debug.print("Parse Prefix {s}:{s} @{s} ", .{ p.lexer.token, p.lexer.raw(), @tagName(level) });
|
||||
// Output.print("Parse Prefix {s}:{s} @{s} ", .{ p.lexer.token, p.lexer.raw(), @tagName(level) });
|
||||
|
||||
switch (p.lexer.token) {
|
||||
.t_super => {
|
||||
@@ -6812,7 +6812,7 @@ pub const P = struct {
|
||||
|
||||
_ = p.pushScopeForParsePass(.function_args, loc) catch unreachable;
|
||||
defer p.popScope();
|
||||
// std.debug.print("HANDLE START ", .{});
|
||||
// Output.print("HANDLE START ", .{});
|
||||
return p.e(p.parseArrowBody(args, p.m(FnOrArrowDataParse{})) catch unreachable, loc);
|
||||
}
|
||||
|
||||
@@ -7763,7 +7763,7 @@ pub const P = struct {
|
||||
}
|
||||
},
|
||||
else => {
|
||||
std.debug.panic("Unexpected type in export default: {s}", .{s2});
|
||||
Global.panic("Unexpected type in export default: {s}", .{s2});
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -8706,7 +8706,7 @@ pub const P = struct {
|
||||
var property = e_.properties[i];
|
||||
|
||||
if (property.kind != .spread) {
|
||||
const key = p.visitExpr(property.key orelse std.debug.panic("Expected property key", .{}));
|
||||
const key = p.visitExpr(property.key orelse Global.panic("Expected property key", .{}));
|
||||
e_.properties[i].key = key;
|
||||
|
||||
// Forbid duplicate "__proto__" properties according to the specification
|
||||
|
||||
Reference in New Issue
Block a user