diff options
Diffstat (limited to 'src/js_parser')
-rw-r--r-- | src/js_parser/imports.zig | 2 | ||||
-rw-r--r-- | src/js_parser/js_parser.zig | 22 | ||||
-rw-r--r-- | src/js_parser/js_parser_test.zig | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/js_parser/imports.zig b/src/js_parser/imports.zig index d5197930d..9ac9f2a3e 100644 --- a/src/js_parser/imports.zig +++ b/src/js_parser/imports.zig @@ -9,7 +9,7 @@ pub const js_printer = @import("../js_printer.zig"); pub const renamer = @import("../renamer.zig"); pub const fs = @import("../fs.zig"); -pub usingnamespace @import("../strings.zig"); +pub usingnamespace @import("../global.zig"); pub usingnamespace @import("../ast/base.zig"); pub usingnamespace js_ast.G; pub usingnamespace @import("../defines.zig"); diff --git a/src/js_parser/js_parser.zig b/src/js_parser/js_parser.zig index 26dfc9bc2..59152f869 100644 --- a/src/js_parser/js_parser.zig +++ b/src/js_parser/js_parser.zig @@ -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 diff --git a/src/js_parser/js_parser_test.zig b/src/js_parser/js_parser_test.zig index 05b9b1f8e..36252f715 100644 --- a/src/js_parser/js_parser_test.zig +++ b/src/js_parser/js_parser_test.zig @@ -203,7 +203,7 @@ fn expectPrinted(t: *Tester, contents: string, expected: string, src: anytype) ! var stream = std.io.fixedBufferStream(&fixedBuffer); try log.print(stream.writer()); - std.debug.print("{s}", .{fixedBuffer}); + Output.print("{s}", .{fixedBuffer}); } var linker = Linker{}; debugl("START AST PRINT"); |