1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: support ctags with -print_v_files and .ctags.d/v.ctags

This commit is contained in:
Delyan Angelov
2020-04-30 19:15:30 +03:00
parent 250dea7bd1
commit a6dfc6d46b
7 changed files with 71 additions and 2 deletions

View File

@@ -82,6 +82,13 @@ pub fn (mut b Builder) parse_imports() {
}
}
b.resolve_deps()
//
if b.pref.print_v_files {
for p in b.parsed_files {
println(p.path)
}
exit(0)
}
}
pub fn (mut b Builder) resolve_deps() {

View File

@@ -33,10 +33,11 @@ pub fn (mut b Builder) gen_c(v_files []string) string {
pub fn (mut b Builder) build_c(v_files []string, out_file string) {
b.out_name_c = out_file
b.info('build_c($out_file)')
output := b.gen_c(v_files)
mut f := os.create(out_file) or {
panic(err)
}
f.writeln(b.gen_c(v_files))
f.writeln(output)
f.close()
// os.write_file(out_file, b.gen_c(v_files))
}

View File

@@ -29,10 +29,11 @@ pub fn (mut b Builder) gen_js(v_files []string) string {
pub fn (mut b Builder) build_js(v_files []string, out_file string) {
b.out_name_js = out_file
b.info('build_js($out_file)')
output := b.gen_js(v_files)
mut f := os.create(out_file) or {
panic(err)
}
f.writeln(b.gen_js(v_files))
f.writeln(output)
f.close()
}