parser.v: fixed pub mut handling

pull/1049/head
Henrixounez 2019-06-24 23:34:39 +02:00 committed by Alex Medvednikov
parent 02edf86c4a
commit 47ad7a4c5e
1 changed files with 6 additions and 2 deletions

View File

@ -460,7 +460,9 @@ fn (p mut Parser) struct_decl() {
is_mut = false is_mut = false
p.scanner.fmt_indent-- p.scanner.fmt_indent--
p.check(PUB) p.check(PUB)
p.check(COLON) if p.tok != MUT {
p.check(COLON)
}
p.scanner.fmt_indent++ p.scanner.fmt_indent++
p.fgenln('') p.fgenln('')
} }
@ -472,7 +474,9 @@ fn (p mut Parser) struct_decl() {
is_pub = false is_pub = false
p.scanner.fmt_indent-- p.scanner.fmt_indent--
p.check(MUT) p.check(MUT)
p.check(COLON) if p.tok != MUT {
p.check(COLON)
}
p.scanner.fmt_indent++ p.scanner.fmt_indent++
p.fgenln('') p.fgenln('')
} }