get_type.v

This commit is contained in:
Alexander Medvednikov 2019-12-05 18:47:29 +03:00
parent 0a38b307cd
commit cb46bf314e
4 changed files with 80 additions and 34 deletions

View file

@ -740,7 +740,7 @@ fn (p mut Parser) type_decl() {
if p.tok == .key_struct {
p.error('use `struct $name {` instead of `type $name struct {`')
}
parent := p.get_type2()
parent := p.get_type3()
nt_pair := p.table.cgen_name_type_pair(name, parent.name)
// TODO dirty C typedef hacks for DOOM
// Unknown type probably means it's a struct, and it's used before the struct is defined,