Skip to content

Commit

Permalink
interface method comments
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Aug 23, 2024
1 parent ad25e0e commit 0a8787d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions ast.v
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ struct Field {
names []Ident @[json: 'Names']
// typ TypeOrIdent @[json: 'Type']
typ Type @[json: 'Type']
doc Doc @[json: 'Doc']
}

struct Ident {
Expand Down
1 change: 0 additions & 1 deletion main.v
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ fn (mut app App) typ(t Type) {
}
FuncType {
app.func_type(t)
// app.gen('FUNC TYPE')
}
}
app.force_upper = false
Expand Down
2 changes: 1 addition & 1 deletion struct.v
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ fn (mut app App) interface_decl(spec Spec) {
// println('TTT ${i_type}')
for field in i_type.methods.list {
// type_name := type_or_ident(field.typ)
app.comments(field.doc)
for n in field.names {
// app.genln('\t${go2v_ident(n.name)} ${go2v_type(type_name)}')
app.gen('\t')
// app.force_upper = true
app.gen(app.go2v_ident(n.name))
app.gen('() ')
app.force_upper = true
app.typ(field.typ)
app.genln('')
Expand Down

0 comments on commit 0a8787d

Please sign in to comment.