Implemented structs
This commit is contained in:
16
src/types/Struct.go
Normal file
16
src/types/Struct.go
Normal file
@ -0,0 +1,16 @@
|
||||
package types
|
||||
|
||||
// Struct is a structure in memory whose regions are addressable with fields.
|
||||
type Struct struct {
|
||||
Name string
|
||||
Fields []*Field
|
||||
Size uint8
|
||||
}
|
||||
|
||||
func (s *Struct) UniqueName() string {
|
||||
return s.Name
|
||||
}
|
||||
|
||||
func (s *Struct) TotalSize() uint8 {
|
||||
return s.Size
|
||||
}
|
Reference in New Issue
Block a user