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

v: add map init

This commit is contained in:
Joe Conigliaro
2020-03-07 18:13:00 +11:00
parent e26907f079
commit 09d9dd2607
6 changed files with 44 additions and 7 deletions

View File

@@ -530,7 +530,7 @@ pub fn (p mut Parser) name_expr() ast.Expr {
// `map[string]int` initialization
if p.tok.lit == 'map' && p.peek_tok.kind == .lsbr {
map_type := p.parse_map_type()
return ast.Type{
return ast.MapInit {
typ: map_type
}
}