Skip to content

Commit c59a5bb

Browse files
authored
parser: clean up array_init() (#17947)
1 parent 76fd55a commit c59a5bb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

vlib/v/parser/containers.v

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ fn (mut p Parser) array_init(is_option bool) ast.ArrayInit {
1010
first_pos := p.tok.pos()
1111
mut last_pos := p.tok.pos()
1212
p.check(.lsbr)
13-
// p.warn('array_init() exp=$p.expected_type')
1413
mut array_type := ast.void_type
1514
mut elem_type := ast.void_type
1615
mut elem_type_pos := first_pos
@@ -61,12 +60,6 @@ fn (mut p Parser) array_init(is_option bool) ast.ArrayInit {
6160
}
6261
p.inside_array_lit = old_inside_array_lit
6362
line_nr := p.tok.line_nr
64-
$if tinyc {
65-
// Note: do not remove the next line without testing
66-
// v selfcompilation with tcc first
67-
tcc_stack_bug := 12345
68-
_ = tcc_stack_bug
69-
}
7063
last_pos = p.tok.pos()
7164
p.check(.rsbr)
7265
if exprs.len == 1 && p.tok.line_nr == line_nr
@@ -104,7 +97,7 @@ fn (mut p Parser) array_init(is_option bool) ast.ArrayInit {
10497
first_pos.extend(last_pos))
10598
}
10699
} else {
107-
if p.tok.kind == .not { // && p.tok.line_nr == p.prev_tok.line_nr {
100+
if p.tok.kind == .not {
108101
last_pos = p.tok.pos()
109102
is_fixed = true
110103
has_val = true

0 commit comments

Comments
 (0)