mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
modules: cyclic import detection
This commit is contained in:

committed by
Alexander Medvednikov

parent
23c5f88f3e
commit
135f200ea2
@@ -149,6 +149,7 @@ fn (p mut Parser) parse() {
|
||||
// Import pass - the first and the smallest pass that only analyzes imports
|
||||
// fully qualify the module name, eg base64 to encoding.base64
|
||||
fq_mod := p.table.qualify_module(p.mod, p.file_path)
|
||||
p.import_table.module_name = fq_mod
|
||||
p.table.register_package(fq_mod)
|
||||
// replace "." with "_dot_" in module name for C variable names
|
||||
p.mod = fq_mod.replace('.', '_dot_')
|
||||
|
Reference in New Issue
Block a user