parser: _ warning => error
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')
|
||||
}
|
||||
if f.name[0] == `_` {
|
||||
// TODO error
|
||||
p.warn('function names cannot start with `_`')
|
||||
p.error('function names cannot start with `_`, use snake_case instead')
|
||||
}
|
||||
if f.name.contains('__') {
|
||||
p.error('function names cannot contain double underscores, use single underscores instead')
|
||||
|
|
Loading…
Reference in New Issue