mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: get existing parser using path
This commit is contained in:
committed by
Alexander Medvednikov
parent
68bcf6830c
commit
24136ab88b
@@ -4,6 +4,7 @@
|
||||
|
||||
module main
|
||||
|
||||
import os
|
||||
import math
|
||||
import strings
|
||||
|
||||
@@ -862,7 +863,7 @@ fn (table &Table) qualify_module(mod string, file_path string) string {
|
||||
for m in table.imports {
|
||||
if m.contains('.') && m.contains(mod) {
|
||||
m_parts := m.split('.')
|
||||
m_path := m_parts.join('/')
|
||||
m_path := m_parts.join(os.PathSeparator)
|
||||
if mod == m_parts[m_parts.len-1] && file_path.contains(m_path) {
|
||||
return m
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user