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

vdoc using the new parser

This commit is contained in:
Alexander Medvednikov
2020-02-19 16:12:39 +01:00
parent 391da0ba07
commit 092c09d81f
11 changed files with 219 additions and 60 deletions

View File

@@ -7,6 +7,8 @@ import (
compiler
internal.help
os
v.table
v.doc
)
const (
@@ -43,6 +45,12 @@ fn main() {
eprintln('v command: $command')
eprintln('v options: $option')
}
if command == 'doc' {
mod := arg[arg.len-1]
table := table.new_table()
println(doc.doc(mod, table))
return
}
if command in simple_cmd {
// External tools
launch_tool(is_verbose, 'v' + command, command)
@@ -60,20 +68,20 @@ fn main() {
launch_tool(is_verbose, 'vrepl', '')
}
'translate' {
println('Translating C to V will be available in V 0.3 (January)')
println('Translating C to V will be available in V 0.3')
}
'search', 'install', 'update', 'remove' {
launch_tool(is_verbose, 'vpm', command)
}
'get' {
println('Use `v install` to install modules from vpm.vlang.io.')
println('Use `v install` to install modules from vpm.vlang.io')
}
'symlink' {
create_symlink()
}
'doc' {
println('Currently unimplemented')
}
//'doc' {
//println('Currently unimplemented')
//}
else {
eprintln('v $command: unknown command\nRun "v help" for usage.')
exit(1)