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

all: simplify global_scope processing (#10848)

This commit is contained in:
yuyi
2021-07-18 20:29:34 +08:00
committed by GitHub
parent eb65ad078d
commit a5c784830b
16 changed files with 35 additions and 76 deletions

View File

@@ -151,9 +151,7 @@ fn (foptions &FormatOptions) format_file(file string) {
}
table := ast.new_table()
// checker := checker.new_checker(table, prefs)
file_ast := parser.parse_file(file, table, .parse_comments, prefs, &ast.Scope{
parent: 0
})
file_ast := parser.parse_file(file, table, .parse_comments, prefs)
// checker.check(file_ast)
formatted_content := fmt.fmt(file_ast, table, prefs, foptions.is_debug)
file_name := os.file_name(file)
@@ -175,9 +173,7 @@ fn (foptions &FormatOptions) format_pipe() {
input_text := os.get_raw_lines_joined()
table := ast.new_table()
// checker := checker.new_checker(table, prefs)
file_ast := parser.parse_text(input_text, '', table, .parse_comments, prefs, &ast.Scope{
parent: 0
})
file_ast := parser.parse_text(input_text, '', table, .parse_comments, prefs)
// checker.check(file_ast)
formatted_content := fmt.fmt(file_ast, table, prefs, foptions.is_debug)
print(formatted_content)