parser: prompt error if struct is made public and if pub is wrongly used
added *yet* to the pub struct errorpull/691/head
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