global var init
This commit is contained in:
@@ -46,11 +46,13 @@ type aGlobal struct {
|
||||
|
||||
// A Global is a named Value holding the address of a package-level
|
||||
// variable.
|
||||
//
|
||||
// Pos() returns the position of the ast.ValueSpec.Names[*]
|
||||
// identifier.
|
||||
type Global = *aGlobal
|
||||
|
||||
// Init initializes the global variable with the given value.
|
||||
func (g Global) Init(v Expr) {
|
||||
g.impl.SetInitializer(v.impl)
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Function represents the parameters, results, and code of a function
|
||||
|
||||
Reference in New Issue
Block a user