1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

array of pointers support

This commit is contained in:
BigBlack
2019-12-18 08:26:04 +08:00
committed by Alexander Medvednikov
parent f00f9fbf5a
commit 67cf7f18e6
5 changed files with 27 additions and 15 deletions

View File

@ -89,7 +89,7 @@ fn (p mut Parser) for_st() {
p.gen_for_varg_header(i, expr, typ, val)
}
else if is_arr {
typ = typ[6..]
typ = typ[6..].replace('_ptr','*')
p.gen_for_header(i, tmp, typ, val)
}
else if is_map {
@ -174,7 +174,7 @@ fn (p mut Parser) for_st() {
p.gen_for_range_header(i, range_end, tmp, typ, val)
}
else if is_arr {
typ = typ[6..]// all after `array_`
typ = typ[6..].replace('_ptr','*')// all after `array_`
p.gen_for_header(i, tmp, typ, val)
}
else if is_str {