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

v: forbid function parameter names, shadowing imported module names (#17210)

This commit is contained in:
ChAoS_UnItY
2023-02-09 02:37:04 +08:00
committed by GitHub
parent c16549b6fd
commit 404a9aa442
45 changed files with 381 additions and 230 deletions

View File

@@ -84,9 +84,9 @@ pub fn parse_file(path string) !Doc {
scanner: scanner.new_scanner(scanner_config)!
}
mut p := parser.new_parser(parser_config)
ast := p.parse()!
ast_ := p.parse()!
return Doc{
ast: ast
ast: ast_
}
}
@@ -102,9 +102,9 @@ pub fn parse_text(text string) !Doc {
scanner: scanner.new_scanner(scanner_config)!
}
mut p := parser.new_parser(parser_config)
ast := p.parse()!
ast_ := p.parse()!
return Doc{
ast: ast
ast: ast_
}
}
@@ -122,9 +122,9 @@ pub fn parse(toml string) !Doc {
scanner: scanner.new_scanner(scanner_config)!
}
mut p := parser.new_parser(parser_config)
ast := p.parse()!
ast_ := p.parse()!
return Doc{
ast: ast
ast: ast_
}
}