Fix two parser bugs

Former-commit-id: 884b0e3e31e562e4f0e0676819c442842ba9040b
This commit is contained in:
Jarred Sumner
2021-08-11 15:54:15 -07:00
parent 3b0a19efe0
commit c3c14ff9ce
3 changed files with 22 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
const std = @import("std");
const logger = @import("logger.zig");
const root = @import("root");
usingnamespace @import("global.zig");
const USERLAND_PANIC_MESSAGE = "iNtErNaL sErVeR eRrOr";
@@ -47,7 +48,9 @@ pub fn NewPanicHandler(panic_func: fn handle_panic(msg: []const u8, error_return
.log = log,
};
}
pub fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace) callconv(.Inline) noreturn {
pub inline fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace) noreturn {
Output.flush();
if (@This().Singleton) |singleton| {
singleton.panic_count += 1;
}