Add more uses of #no_capture

This commit is contained in:
gingerBill
2024-07-14 11:56:04 +01:00
parent edc793d7c1
commit c7bd954752
19 changed files with 64 additions and 64 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ import "core:fmt"
import "core:unicode"
import "core:unicode/utf8"
Error_Handler :: #type proc(pos: Pos, fmt: string, args: ..any)
Error_Handler :: #type proc(pos: Pos, fmt: string, #no_capture args: ..any)
Token :: struct {
kind: Token_Kind,
@@ -112,13 +112,13 @@ offset_to_pos :: proc(t: ^Tokenizer, offset: int) -> Pos {
}
}
default_error_handler :: proc(pos: Pos, msg: string, args: ..any) {
default_error_handler :: proc(pos: Pos, msg: string, #no_capture args: ..any) {
fmt.eprintf("%s(%d:%d) ", pos.file, pos.line, pos.column)
fmt.eprintf(msg, ..args)
fmt.eprintf("\n")
}
error :: proc(t: ^Tokenizer, offset: int, msg: string, args: ..any) {
error :: proc(t: ^Tokenizer, offset: int, msg: string, #no_capture args: ..any) {
pos := offset_to_pos(t, offset)
if t.err != nil {
t.err(pos, msg, ..args)