1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
Alexander Medvednikov 2019-10-23 15:55:14 +03:00
parent 6174dfb424
commit 1db1e0f4b7

View File

@ -21,6 +21,7 @@ fn generate_vh(mod string) {
vexe := os.executable()
full_mod_path := os.dir(vexe) + '/' + mod
mod_path := mod.replace('.', os.path_separator)
dir := if mod.starts_with('vlib') {
'$compiler.v_modules_path${os.path_separator}$mod'
@ -34,6 +35,9 @@ fn generate_vh(mod string) {
// os.mkdir(os.realpath(dir))
}
out := os.create(path) or { panic(err) }
mod_def := if mod.contains('/') { mod.all_after('/') } else { mod } // "os"
out.writeln('// $mod module header \n')
out.writeln('module $mod_def\n')
// Consts
println(full_mod_path)
mut vfiles := os.walk_ext(full_mod_path, '.v')