&call->args);
if (new_callee == NULL) {
+ if (context.cycle_almost_detected < 2) {
+ YIELD(call->token->pos, "Waiting to know all options for overloaded function");
+ }
+
report_unable_to_match_overload(call, ((AstOverloadedFunction *) callee)->overloads);
return Check_Error;
}
// Defines what happens when `log()` is called. Defaults to a
// logger that filters log messages by their severity.
- logger : Logger = .{ Default_Logger.log, ^default_logger };
+ logger : Logger = .{ default_logger_proc, ^default_logger };
// Defines what happens when an `assert()` check fails. Defaults
// to printing the error and running an unreachable instruction,
}
}
- for line: reader->lines() {
- defer string.free(line);
-
+ for line: reader->lines(allocator = context.temp_allocator) {
out: csv.Output_Type;
for entry: string.split_iter(line, #char ",")
return 0, .None;
}
-lines :: (r: ^Reader, inplace := false) =>
+lines :: (r: ^Reader, inplace := false, allocator := context.allocator) =>
iter.generator(^.{
r = r,
- inplace = inplace
+ inplace = inplace,
+ allocator = allocator,
}, (ctx: $C) -> (str, bool) {
- line := ctx.r->read_line(consume_newline=true, inplace=ctx.inplace);
+ line := ctx.r->read_line(consume_newline=true, inplace=ctx.inplace, allocator=ctx.allocator);
if line.count > 0 do return line, true;
else do return "", false;