v / vlib / v2 / builder / parse_d_parallel.v
14 lines · 12 sloc · 538 bytes · d358576851079d4716834cc86627307d28acd1ae
Raw
1// Copyright (c) 2020-2024 Joe Conigliaro. All rights reserved.
2// Use of this source code is governed by an MIT license
3// that can be found in the LICENSE file.
4module builder
5
6import v2.ast
7
8fn (mut b Builder) parse_files_parallel(files []string) []ast.File {
9 // FlatAst mode is the only builder parse pipeline. Keep `-parallel`
10 // parsing serial for now: token.FileSet shares position counters and file
11 // slices that are not concurrency-safe, and selector_names are keyed by
12 // those position ids.
13 return b.parse_files(files)
14}
15