parser: enum_decl - remove redundant position variable
parent
14c4ba6dd9
commit
a0d10a6606
|
@ -1890,7 +1890,6 @@ fn (mut p Parser) enum_decl() ast.EnumDecl {
|
|||
}
|
||||
p.check(.key_enum)
|
||||
end_pos := p.tok.position()
|
||||
name_pos := p.tok.position()
|
||||
enum_name := p.check_name()
|
||||
if enum_name.len == 1 {
|
||||
p.error_with_pos('single letter capital names are reserved for generic template types.',
|
||||
|
@ -1962,7 +1961,7 @@ $pubfn (mut e $enum_name) toggle(flag $enum_name) { unsafe{ *e = int(*e) ^ (
|
|||
})
|
||||
if idx == -1 {
|
||||
p.error_with_pos('cannot register enum `$name`, another type with this name exists',
|
||||
name_pos)
|
||||
end_pos)
|
||||
}
|
||||
return ast.EnumDecl{
|
||||
name: name
|
||||
|
|
Loading…
Reference in New Issue