parser: allow `as` in consts

pull/3673/head
Alexander Medvednikov 2020-02-07 14:53:07 +01:00
parent 9034b1fd08
commit c8dcbcb649
1 changed files with 5 additions and 0 deletions

View File

@ -692,6 +692,11 @@ fn (p mut Parser) expression() string {
}
}
}
// `as` cast
// TODO remove copypasta
if p.tok == .key_as {
return p.key_as(typ, ph)
}
return typ
}