Skip to content

Commit 46447f1

Browse files
authored
tools: move cmd/tools/vdoc/doc to cmd/tools/vdoc/document, so that it can be imported from other programs through -path, without conflicting with the top level doc/ folder in the main repo (#23733)
1 parent 00a08c4 commit 46447f1

15 files changed

Lines changed: 18 additions & 20 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module doc
1+
module document
22

33
import v.token
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module doc
1+
module document
22

33
import os
44
import time

cmd/tools/vdoc/doc/doc_private_fn_test.v renamed to cmd/tools/vdoc/document/doc_private_fn_test.v

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module doc
1+
module document
22

33
import os
44

@@ -37,9 +37,7 @@ fn test_get_parent_mod_normal_cases() {
3737
assert err.msg() == 'No V files found.'
3838
'---'
3939
}
40-
// TODO: WTF?
41-
// assert get_parent_mod(os.join_path(@VMODROOT, 'vlib', 'v', 'doc', 'doc.v'))? == 'v.v.doc'
42-
assert get_parent_mod(os.join_path(@VMODROOT, 'vlib', 'v', 'doc'))? == 'v'
40+
assert get_parent_mod(os.join_path(@VMODROOT, 'vlib', 'v', 'token'))? == 'v'
4341
assert get_parent_mod(os.join_path(@VMODROOT, 'vlib', 'os', 'os.v'))? == 'os'
4442
assert get_parent_mod(os.join_path(@VMODROOT, 'cmd'))? == ''
4543
assert get_parent_mod(os.join_path(@VMODROOT, 'cmd', 'tools', 'modules', 'testing',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// import v.ast
2-
import doc
2+
import document as doc
33

44
// fn test_generate_with_pos() {}
55
// fn test_generate() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module doc
1+
module document
22

33
import os
44
import v.ast
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module doc
1+
module document
22

33
import os
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module doc
1+
module document
22

33
import strings
44
import v.ast
@@ -107,7 +107,7 @@ pub fn merge_doc_comments(comments []DocComment) string {
107107
for key in highlight_keys {
108108
if ll.starts_with(key) {
109109
comment += '\n\n${key.title()}${l[key.len..]}'
110-
// Workaround for compiling with `v -cstrict -cc gcc cmd/tools/vdoc/doc/doc_test.v`
110+
// Workaround for compiling with `v -cstrict -cc gcc cmd/tools/vdoc/document/doc_test.v`
111111
// and using multiple continue `<label>`.
112112
continue_line_loop = true
113113
break

‎cmd/tools/vdoc/html.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import markdown
88
import v.scanner
99
import v.ast
1010
import v.token
11-
import doc
11+
import document as doc
1212
import v.pref
1313
import v.util { tabs }
1414

‎cmd/tools/vdoc/main.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module main
33
import os
44
import os.cmdline
55
import term
6-
import doc
6+
import document as doc
77
import v.vmod
88

99
const vexe = os.getenv_opt('VEXE') or { @VEXE }

‎cmd/tools/vdoc/markdown.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module main
22

33
import strings
4-
import doc
4+
import document as doc
55

66
fn (vd &VDoc) gen_markdown(d doc.Doc, with_toc bool) string {
77
cfg := vd.cfg

0 commit comments

Comments
 (0)