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

allow short struct initialization with Config structs

This commit is contained in:
Alexander Medvednikov
2020-01-14 15:34:47 +01:00
parent 0b235cc893
commit 6b3f54692a
3 changed files with 11 additions and 1 deletions

View File

@ -337,6 +337,7 @@ fn (p mut Parser) struct_decl(generic_param_types []string) {
// p.fgenln('//kek')
}
// `User{ foo: bar }`
// tok == struct name
fn (p mut Parser) struct_init(typ_ string) string {
p.is_struct_init = true
mut typ := typ_