From d3d73590d3a393756ce39920cce3f9b02705d95d Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 24 Jun 2024 22:43:14 +0200 Subject: Fix CSV comments. --- core/encoding/csv/reader.odin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/encoding') diff --git a/core/encoding/csv/reader.odin b/core/encoding/csv/reader.odin index 200bf43ea..b0a5d82ed 100644 --- a/core/encoding/csv/reader.odin +++ b/core/encoding/csv/reader.odin @@ -138,7 +138,9 @@ iterator_next :: proc(r: ^Reader) -> (record: []string, idx: int, err: Error, mo return record, r.line_count - 1, r.last_iterator_error, r.last_iterator_error == nil } -// Get last error if we the iterator +// Get last CSV parse error if we ignored it in the iterator loop +// +// for record, row_idx in csv.iterator_next(&r) { ... } iterator_last_error :: proc(r: Reader) -> (err: Error) { return r.last_iterator_error } @@ -169,7 +171,7 @@ is_io_error :: proc(err: Error, io_err: io.Error) -> bool { // read_all reads all the remaining records from r. // Each record is a slice of fields. -// read_all is defined to read until an EOF, and does not treat, and does not treat EOF as an error +// read_all is defined to read until an EOF, and does not EOF as an error @(require_results) read_all :: proc(r: ^Reader, allocator := context.allocator) -> ([][]string, Error) { context.allocator = allocator -- cgit v1.2.3 From d97fe41834c7030dfc4f975200a084f6cdd3d317 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 24 Jun 2024 22:45:12 +0200 Subject: Mark deux --- core/encoding/csv/reader.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/encoding') diff --git a/core/encoding/csv/reader.odin b/core/encoding/csv/reader.odin index b0a5d82ed..ebc7b39a0 100644 --- a/core/encoding/csv/reader.odin +++ b/core/encoding/csv/reader.odin @@ -171,7 +171,7 @@ is_io_error :: proc(err: Error, io_err: io.Error) -> bool { // read_all reads all the remaining records from r. // Each record is a slice of fields. -// read_all is defined to read until an EOF, and does not EOF as an error +// read_all is defined to read until an EOF, and does not treat EOF as an error @(require_results) read_all :: proc(r: ^Reader, allocator := context.allocator) -> ([][]string, Error) { context.allocator = allocator -- cgit v1.2.3