-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
vlib/v/fmt/tests/struct_decl_with_const_default_value_and_comments_keep.vv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module foo | ||
|
||
pub const endline_cr_len = 1 | ||
|
||
pub struct RandomAccessReader { | ||
pub mut: | ||
index i64 | ||
|
||
start_index i64 | ||
end_index i64 = -1 | ||
|
||
end_line u8 = `\n` | ||
end_line_len int = foo.endline_cr_len // size of the endline rune \n = 1, \r\n = 2 | ||
separator u8 = `,` // comma is the default separator | ||
separator_len int = 1 // size of the separator rune | ||
quote u8 = `"` // double quote is the standard quote char | ||
quote_remove bool // if true clear the cell from the quotes | ||
comment u8 = `#` // every line that start with the quote char is ignored | ||
|
||
default_cell string = '*' // return this string if out of the csv boundaries | ||
empty_cell string = '#' // retunrn this if empty cell | ||
// ram buffer | ||
mem_buf_type u32 // buffer type 0=File,1=RAM | ||
mem_buf voidptr // buffer used to load chars from file | ||
mem_buf_size i64 // size of the buffer | ||
mem_buf_start i64 = -1 // start index in the file of the read buffer | ||
mem_buf_end i64 = -1 // end index in the file of the read buffer | ||
// csv map for quick access | ||
csv_map [][]i64 | ||
// header | ||
header_row int = -1 // row index of the header in the csv_map | ||
header_list []HeaderItem // list of the header item | ||
header_map map[string]int // map from header label to column index | ||
} |