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

rename table.register_type2()

This commit is contained in:
Alexander Medvednikov
2019-12-05 14:09:33 +03:00
parent 0ff2754677
commit 2a1b0a8cae
7 changed files with 15 additions and 15 deletions

View File

@ -8,7 +8,7 @@ fn (p mut Parser) enum_decl(no_name bool) {
is_pub := p.tok == .key_pub
if is_pub {
p.next()
}
}
p.check(.key_enum)
p.fspace()
mut enum_name := p.check_name()
@ -47,7 +47,7 @@ fn (p mut Parser) enum_decl(no_name bool) {
p.next()
enum_assign_tidx = p.cur_tok_index()
p.error_with_token_index('only numbers are allowed in enum initializations', enum_assign_tidx)
}
}
}
if p.pass == .main {
p.cgen.consts << '#define $name $val'
@ -57,7 +57,7 @@ fn (p mut Parser) enum_decl(no_name bool) {
}
val++
}
p.table.register_type2(Type {
p.table.register_type(Type {
name: enum_name
mod: p.mod
parent: 'int'