7 // LocalValue is the address of a local value.
8 type LocalValue struct {
13 func (v LocalValue) String() string {
14 return "local." + v.Name
17 // Absolute converts the receiver into an absolute address within the given
19 func (v LocalValue) Absolute(m ModuleInstance) AbsLocalValue {
26 // AbsLocalValue is the absolute address of a local value within a module instance.
27 type AbsLocalValue struct {
32 // LocalValue returns the absolute address of a local value of the given
33 // name within the receiving module instance.
34 func (m ModuleInstance) LocalValue(name string) AbsLocalValue {
37 LocalValue: LocalValue{
43 func (v AbsLocalValue) String() string {
44 if len(v.Module) == 0 {
45 return v.LocalValue.String()
47 return fmt.Sprintf("%s.%s", v.Module.String(), v.LocalValue.String())