compiler: let attributes work with pub functions

pull/2023/head
joe-conigliaro 2019-09-18 22:32:55 +10:00 committed by Alexander Medvednikov
parent 040d03912b
commit 695d4018ea
1 changed files with 1 additions and 1 deletions

View File

@ -3632,7 +3632,7 @@ fn (p mut Parser) attribute() {
p.attr = p.check_name()
}
p.check(.rsbr)
if p.tok == .func {
if p.tok == .func || (p.tok == .key_pub && p.peek() == .func) {
p.fn_decl()
p.attr = ''
return