1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser.v: fixed pub mut handling

This commit is contained in:
Henrixounez 2019-06-24 23:34:39 +02:00 committed by Alex Medvednikov
parent 02edf86c4a
commit 47ad7a4c5e

View File

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