mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
1
This commit is contained in:
parent
6174dfb424
commit
1db1e0f4b7
@ -21,6 +21,7 @@ fn generate_vh(mod string) {
|
|||||||
vexe := os.executable()
|
vexe := os.executable()
|
||||||
full_mod_path := os.dir(vexe) + '/' + mod
|
full_mod_path := os.dir(vexe) + '/' + mod
|
||||||
|
|
||||||
|
|
||||||
mod_path := mod.replace('.', os.path_separator)
|
mod_path := mod.replace('.', os.path_separator)
|
||||||
dir := if mod.starts_with('vlib') {
|
dir := if mod.starts_with('vlib') {
|
||||||
'$compiler.v_modules_path${os.path_separator}$mod'
|
'$compiler.v_modules_path${os.path_separator}$mod'
|
||||||
@ -34,6 +35,9 @@ fn generate_vh(mod string) {
|
|||||||
// os.mkdir(os.realpath(dir))
|
// os.mkdir(os.realpath(dir))
|
||||||
}
|
}
|
||||||
out := os.create(path) or { panic(err) }
|
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
|
// Consts
|
||||||
println(full_mod_path)
|
println(full_mod_path)
|
||||||
mut vfiles := os.walk_ext(full_mod_path, '.v')
|
mut vfiles := os.walk_ext(full_mod_path, '.v')
|
||||||
|
Loading…
Reference in New Issue
Block a user