mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: _ warning => error
This commit is contained in:
parent
a06e2298f0
commit
336e82d162
@ -242,8 +242,7 @@ fn (p mut Parser) fn_decl() {
|
|||||||
p.error('function names cannot contain uppercase letters, use snake_case instead')
|
p.error('function names cannot contain uppercase letters, use snake_case instead')
|
||||||
}
|
}
|
||||||
if f.name[0] == `_` {
|
if f.name[0] == `_` {
|
||||||
// TODO error
|
p.error('function names cannot start with `_`, use snake_case instead')
|
||||||
p.warn('function names cannot start with `_`')
|
|
||||||
}
|
}
|
||||||
if f.name.contains('__') {
|
if f.name.contains('__') {
|
||||||
p.error('function names cannot contain double underscores, use single underscores instead')
|
p.error('function names cannot contain double underscores, use single underscores instead')
|
||||||
|
Loading…
Reference in New Issue
Block a user