mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
modules: cyclic import detection
This commit is contained in:
parent
23c5f88f3e
commit
135f200ea2
4 changed files with 180 additions and 39 deletions
|
@ -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_')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue