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

parser: ignore upper letter case restriction for fn C.xyz declarations

This commit is contained in:
Delyan Angelov 2022-03-26 21:20:28 +02:00
parent fcb57312b9
commit bea0d500d0
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -834,7 +834,7 @@ fn (mut p Parser) fn_args() ([]ast.Param, bool, bool) {
mut arg_pos := [p.tok.pos()] mut arg_pos := [p.tok.pos()]
name := p.check_name() name := p.check_name()
mut arg_names := [name] mut arg_names := [name]
if name.len > 0 && name[0].is_capital() { if name.len > 0 && p.fn_language == .v && name[0].is_capital() {
p.error_with_pos('parameter name must not begin with upper case letter (`${arg_names[0]}`)', p.error_with_pos('parameter name must not begin with upper case letter (`${arg_names[0]}`)',
p.prev_tok.pos()) p.prev_tok.pos())
} }