mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: make vgen use strings.Builder & allow parser creation from string
This commit is contained in:

committed by
Alexander Medvednikov

parent
8cbfd7a9da
commit
ad99b82930
@ -855,14 +855,14 @@ fn (table &Table) qualify_module(mod string, file_path string) string {
|
||||
return mod
|
||||
}
|
||||
|
||||
fn (table &Table) get_file_import_table(file_path string) FileImportTable {
|
||||
fn (table &Table) get_file_import_table(id string) FileImportTable {
|
||||
// if file_path.clone() in table.file_imports {
|
||||
// return table.file_imports[file_path.clone()]
|
||||
// }
|
||||
// just get imports. memory error when recycling import table
|
||||
mut fit := new_file_import_table(file_path)
|
||||
if file_path in table.file_imports {
|
||||
fit.imports = table.file_imports[file_path].imports
|
||||
mut fit := new_file_import_table(id)
|
||||
if id in table.file_imports {
|
||||
fit.imports = table.file_imports[id].imports
|
||||
}
|
||||
return fit
|
||||
}
|
||||
|
Reference in New Issue
Block a user