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

parser.v: changed the booleans controlling if pub or mut

This commit is contained in:
Henrixounez 2019-06-24 23:37:35 +02:00 committed by Alex Medvednikov
parent 47ad7a4c5e
commit 31a03ae93e

View File

@ -457,7 +457,6 @@ fn (p mut Parser) struct_decl() {
p.error('structs can only have one `pub:`, all public fields have to be grouped') p.error('structs can only have one `pub:`, all public fields have to be grouped')
} }
is_pub = true is_pub = true
is_mut = false
p.scanner.fmt_indent-- p.scanner.fmt_indent--
p.check(PUB) p.check(PUB)
if p.tok != MUT { if p.tok != MUT {
@ -471,7 +470,6 @@ fn (p mut Parser) struct_decl() {
p.error('structs can only have one `mut:`, all private mutable fields have to be grouped') p.error('structs can only have one `mut:`, all private mutable fields have to be grouped')
} }
is_mut = true is_mut = true
is_pub = false
p.scanner.fmt_indent-- p.scanner.fmt_indent--
p.check(MUT) p.check(MUT)
if p.tok != MUT { if p.tok != MUT {