v.ast: add a mod field to ast.FnTypeDecl too

This commit is contained in:
Delyan Angelov 2025-09-11 13:18:56 +03:00
parent fd479a2bcd
commit d73ebc1aca
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
3 changed files with 3 additions and 0 deletions

View File

@ -897,6 +897,7 @@ fn (t Tree) fn_type_decl(node ast.FnTypeDecl) &Node {
mut obj := create_object()
obj.add_terse('ast_type', t.string_node('FnTypeDecl'))
obj.add_terse('name', t.string_node(node.name))
obj.add_terse('mod', t.string_node(node.mod))
obj.add_terse('is_pub', t.bool_node(node.is_pub))
obj.add_terse('typ', t.type_node(node.typ))
obj.add('pos', t.pos(node.pos))

View File

@ -1522,6 +1522,7 @@ pub mut:
pub struct FnTypeDecl {
pub:
name string
mod string
is_pub bool
typ Type
pos token.Pos

View File

@ -2782,6 +2782,7 @@ fn (mut p Parser) type_decl() ast.TypeDecl {
p.attrs = []
return ast.FnTypeDecl{
name: fn_name
mod: p.mod
is_pub: is_pub
typ: fn_type
pos: decl_pos