This commit is contained in:
parent
ed6ae1d306
commit
714a722aaa
7 changed files with 189 additions and 1 deletions
16
src/types/Pointer.go
Normal file
16
src/types/Pointer.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package types
|
||||
|
||||
// Pointer is the address of an object.
|
||||
type Pointer struct {
|
||||
To Type
|
||||
}
|
||||
|
||||
// Name returns the type name.
|
||||
func (p *Pointer) Name() string {
|
||||
return "*" + p.To.Name()
|
||||
}
|
||||
|
||||
// Size returns the total size in bytes.
|
||||
func (p *Pointer) Size() int {
|
||||
return 8
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue