Skip to content

Commit

Permalink
finalize; rebase on master, remove parser.comments_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Apr 6, 2024
1 parent 79d2738 commit 81cc83c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions vlib/arrays/arrays.v
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ pub fn chunk[T](array []T, size int) [][]T {
}

pub struct WindowAttribute {
pub:
size int
step int = 1
}
Expand Down
4 changes: 2 additions & 2 deletions vlib/io/reader.v
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ pub const read_all_grow_len = 1024
// ReadAllConfig allows options to be passed for the behaviour
// of read_all.
pub struct ReadAllConfig {
read_to_end_of_stream bool
pub:
reader Reader
read_to_end_of_stream bool
reader Reader
}

// read_all reads all bytes from a reader until either a 0 length read
Expand Down
10 changes: 5 additions & 5 deletions vlib/v/checker/struct.v
Original file line number Diff line number Diff line change
Expand Up @@ -743,13 +743,13 @@ or use an explicit `unsafe{ a[..] }`, if you do not want a copy of the slice.',
if c.mod != type_sym.mod {
if !field.is_pub {
parts := type_sym.name.split('.')
mod_type := if parts.len > 1 {
parts#[-2..].join('.')
} else {
parts.last()
}
for init_field in node.init_fields {
if field.name == init_field.name {
mod_type := if parts.len > 1 {
parts#[-2..].join('.')
} else {
parts.last()
}
c.error('cannot access private field `${field.name}` on `${mod_type}`',
init_field.pos)
break
Expand Down
7 changes: 3 additions & 4 deletions vlib/v/parser/parser.v
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ mut:
script_mode bool
script_mode_start_token token.Token
pub mut:
scanner &scanner.Scanner = unsafe { nil }
comments_mode scanner.CommentsMode = .skip_comments
table &ast.Table = unsafe { nil }
scope &ast.Scope = unsafe { nil }
scanner &scanner.Scanner = unsafe { nil }
table &ast.Table = unsafe { nil }
scope &ast.Scope = unsafe { nil }
errors []errors.Error
warnings []errors.Warning
notices []errors.Notice
Expand Down

0 comments on commit 81cc83c

Please sign in to comment.