aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/csv
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-06-24 22:43:14 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-06-24 22:43:14 +0200
commitd3d73590d3a393756ce39920cce3f9b02705d95d (patch)
tree92ecd2a2795a9edaee083f6229c1bf1a6a0641df /core/encoding/csv
parent185e39e53dd8379cd59cd1d7496d4ad1a2c1e0ce (diff)
Fix CSV comments.
Diffstat (limited to 'core/encoding/csv')
-rw-r--r--core/encoding/csv/reader.odin6
1 files changed, 4 insertions, 2 deletions
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