Compare commits

...

2 Commits

Author SHA1 Message Date
62a318e69b Fix comments not being properly tokenized
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-07-22 14:56:57 +01:00
7c71e0528f Add line delimiter between error messages and traces 2023-07-22 14:46:35 +01:00
3 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,5 @@
// Test comment.
# Test comment.
@log_info("game is loading")
return {

View File

@ -119,7 +119,7 @@ pub const Tokenizer = struct {
'#' => {
cursor += 1;
while (cursor < self.source.len and self.source[cursor] == '\n') {
while (cursor < self.source.len and self.source[cursor] != '\n') {
cursor += 1;
}
},

View File

@ -15,10 +15,14 @@ fn kym_handle_errors(info: kym.ErrorInfo) void {
var remaining_frames = info.frames.len;
while (remaining_frames != 0) {
remaining_frames -= 1;
if (remaining_frames != 0) {
app.log_fail("stack trace:");
app.log_fail(info.frames[remaining_frames].name);
while (remaining_frames != 0) {
remaining_frames -= 1;
app.log_fail(info.frames[remaining_frames].name);
}
}
}