Improved documentation
This commit is contained in:
parent
1b75529bb3
commit
96078f40d8
6 changed files with 49 additions and 26 deletions
|
@ -4,12 +4,12 @@ import "maps"
|
|||
|
||||
// Assembler contains a list of instructions.
|
||||
type Assembler struct {
|
||||
Instructions []Instruction
|
||||
Data map[string][]byte
|
||||
Instructions []Instruction
|
||||
}
|
||||
|
||||
// Merge combines the contents of this assembler with another one.
|
||||
func (a *Assembler) Merge(b Assembler) {
|
||||
a.Instructions = append(a.Instructions, b.Instructions...)
|
||||
maps.Copy(a.Data, b.Data)
|
||||
a.Instructions = append(a.Instructions, b.Instructions...)
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
// RegisterLabel operates with a register and a label.
|
||||
type RegisterLabel struct {
|
||||
Register cpu.Register
|
||||
Label string
|
||||
Register cpu.Register
|
||||
}
|
||||
|
||||
// String returns a human readable version.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue