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

array: map() method

This commit is contained in:
Alexander Medvednikov
2019-10-26 14:25:03 +03:00
parent f6f5b8cfb1
commit 4ef10c92f4
2 changed files with 43 additions and 0 deletions

View File

@ -1947,6 +1947,10 @@ fn (p mut Parser) dot(str_typ_ string, method_ph int) string {
p.gen_array_filter(str_typ, method_ph)
return str_typ
}
else if field_name == 'map' && str_typ.starts_with('array_') {
p.gen_array_map(str_typ, method_ph)
return str_typ
}
fname_tidx := p.cur_tok_index()
p.fgen(field_name)