1
0
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:
joe-conigliaro
2019-10-05 14:10:28 +10:00
committed by Alexander Medvednikov
parent 68bcf6830c
commit 24136ab88b
7 changed files with 65 additions and 60 deletions

View File

@@ -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
}