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

vdoc: add a node type prefix (#7563)

This commit is contained in:
Daniel Däschle
2020-12-26 07:55:35 +01:00
committed by GitHub
parent d66ed46486
commit 6842c3c1a4
2 changed files with 28 additions and 10 deletions

View File

@ -28,6 +28,18 @@ pub enum SymbolKind {
struct_field
}
pub fn (sk SymbolKind) str() string {
return match sk {
.const_group { 'Constants' }
.function, .method { 'fn' }
.interface_ { 'interface' }
.typedef { 'type' }
.enum_ { 'enum' }
.struct_ { 'struct' }
else { '' }
}
}
pub struct Doc {
prefs &pref.Preferences = new_vdoc_preferences()
pub mut: