Skip to content

Commit d73ebc1

Browse files
committed
v.ast: add a mod field to ast.FnTypeDecl too
1 parent fd479a2 commit d73ebc1

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎cmd/tools/vast/vast.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ fn (t Tree) fn_type_decl(node ast.FnTypeDecl) &Node {
897897
mut obj := create_object()
898898
obj.add_terse('ast_type', t.string_node('FnTypeDecl'))
899899
obj.add_terse('name', t.string_node(node.name))
900+
obj.add_terse('mod', t.string_node(node.mod))
900901
obj.add_terse('is_pub', t.bool_node(node.is_pub))
901902
obj.add_terse('typ', t.type_node(node.typ))
902903
obj.add('pos', t.pos(node.pos))

‎vlib/v/ast/ast.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,7 @@ pub mut:
15221522
pub struct FnTypeDecl {
15231523
pub:
15241524
name string
1525+
mod string
15251526
is_pub bool
15261527
typ Type
15271528
pos token.Pos

‎vlib/v/parser/parser.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,7 @@ fn (mut p Parser) type_decl() ast.TypeDecl {
27822782
p.attrs = []
27832783
return ast.FnTypeDecl{
27842784
name: fn_name
2785+
mod: p.mod
27852786
is_pub: is_pub
27862787
typ: fn_type
27872788
pos: decl_pos

0 commit comments

Comments
 (0)