mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: prompt error if struct is made public and if pub is wrongly used
added *yet* to the pub struct error
This commit is contained in:
parent
7e641cd5ba
commit
b1183dfe2c
@ -179,8 +179,12 @@ fn (p mut Parser) parse() {
|
||||
case PUB:
|
||||
if p.peek() == FUNC {
|
||||
p.fn_decl()
|
||||
}
|
||||
} else if p.peek() == STRUCT {
|
||||
p.error('structs can\'t be declared public *yet*')
|
||||
// TODO public structs
|
||||
} else {
|
||||
p.error('wrong pub keyword usage')
|
||||
}
|
||||
case FUNC:
|
||||
p.fn_decl()
|
||||
case TIP:
|
||||
|
Loading…
Reference in New Issue
Block a user