compiler: use the new optimized in

This commit is contained in:
Alexander Medvednikov 2019-10-06 16:55:27 +03:00
parent 5acadbab32
commit 03bc5ab3d5
2 changed files with 3 additions and 10 deletions

View file

@ -296,11 +296,8 @@ fn (p mut Parser) fn_decl() {
}
// Returns a type?
mut typ := 'void'
if p.tok == .name || p.tok == .mul || p.tok == .amp || p.tok == .lsbr ||
p.tok == .question || p.tok == .lpar {
if p.tok in [Token.name, .mul, .amp, .lsbr, .question, .lpar] {
p.fgen(' ')
// TODO In
// if p.tok in [ .name, .mul, .amp, .lsbr ] {
typ = p.get_type()
}
// multiple returns