mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: remove last
This commit is contained in:
parent
6a812f7293
commit
73134035a9
@ -3393,17 +3393,6 @@ fn (p mut Parser) for_st() {
|
|||||||
else if is_arr {
|
else if is_arr {
|
||||||
typ = typ[6..]// all after `array_`
|
typ = typ[6..]// all after `array_`
|
||||||
p.gen_for_header(i, tmp, typ, val)
|
p.gen_for_header(i, tmp, typ, val)
|
||||||
p.register_var(Var {
|
|
||||||
name: 'last'
|
|
||||||
typ: 'bool'
|
|
||||||
is_mut: false
|
|
||||||
is_used: true
|
|
||||||
})
|
|
||||||
// TODO don't generate if it's not used.
|
|
||||||
// Otherwise it's a C warning + perf.
|
|
||||||
if !p.is_js {
|
|
||||||
p.genln('bool last = $i == $tmp . len - 1;')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if is_str {
|
else if is_str {
|
||||||
typ = 'byte'
|
typ = 'byte'
|
||||||
|
Loading…
Reference in New Issue
Block a user