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

don't allow calling private functions/methods

This commit is contained in:
Alexander Medvednikov
2019-06-26 12:56:49 +02:00
parent 2a3cf0bec9
commit c860bac7bf
8 changed files with 39 additions and 28 deletions

View File

@ -239,7 +239,7 @@ fn (t Token) str() string {
fn (t Token) is_decl() bool {
// TODO return t in [FUNC ,TIP, CONST, IMPORT_CONST ,AT ,EOF]
return t == ENUM || t == INTERFACE || t == FUNC || t == STRUCT || t == TIP ||
t == CONST || t == IMPORT_CONST || t == AT || t == EOF
t == CONST || t == IMPORT_CONST || t == AT || t == PUB || t == EOF
}
const (