Added types package
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-06-20 16:16:48 +02:00
parent ed6ae1d306
commit 714a722aaa
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
7 changed files with 189 additions and 1 deletions

16
src/types/Pointer.go Normal file
View 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
}