19. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
20. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
type (?
A struct {?
Foo string?
}?
B struct {?
Bar string?
}?
)
こういう記法もある(怖い
21. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
ast.Ident
22. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
ast.Ident
ast.StructType
23. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
ast.Ident
ast.StructType
ast.FieldList
24. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
ast.Ident
ast.StructType
ast.FieldList
ast.Field type A struct {?
Foo, Bar string?
}
こういう記法もある(怖い
25. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
ast.Ident
ast.StructType
ast.FieldList
ast.Field
ast.Ident
26. Game struct → AST
type Game struct {?
ID int64?
Title string?
Price int?
InDevelopment bool?
ShippedAt time.Time?
}
ast = go/ast package
ast.GenDecl
ast.TypeSpec
ast.Ident
ast.StructType
ast.FieldList
ast.Field
ast.Ident
ast.Ident