5.4 处理逻辑
5.4.1 相关代码
type Package struct {
Imports []*types.Pkg // <<Imports>>
// Init functions, listed in source order.
Inits []*Func
// Top-level declarations.
Decls []Node
// Extern (package global) declarations.
Externs []Node
// Assembly function declarations.
Asms []*Name
// Cgo directives.
CgoPragmas [][]string
// Variables with //go:embed lines.
Embeds []*Name
// Exported (or re-exported) symbols.
Exports []*Name
// Map from function names of stencils to already-created stencils.
Stencils map[*types.Sym]*Func
}5.4.2 构建入口及步骤
5.4.3 Import 语句
5.4.4 翻译 AST

5.4.5 告别泛型
最后更新于