mirror of
https://github.com/zellyn/go6502.git
synced 2025-08-06 14:25:48 +00:00
22 lines
477 B
Go
22 lines
477 B
Go
package context
|
|
|
|
/* Labeler is an interface that the flavors implement to handle label correction. */
|
|
type Labeler interface {
|
|
LastLabel() string
|
|
SetLastLabel(label string)
|
|
FixLabel(label string, macroCall int, locals map[string]bool) (string, error)
|
|
IsNewParentLabel(label string) bool
|
|
}
|
|
|
|
type LabelerBase struct {
|
|
lastLabel string
|
|
}
|
|
|
|
func (lb *LabelerBase) LastLabel() string {
|
|
return lb.lastLabel
|
|
}
|
|
|
|
func (lb *LabelerBase) SetLastLabel(l string) {
|
|
lb.lastLabel = l
|
|
}
|