2023-12-09 03:12:45 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
type Token interface{}
|
|
|
|
|
|
|
|
type SectionToken struct {
|
|
|
|
SectionName string
|
|
|
|
}
|
|
|
|
|
|
|
|
type GlobalToken struct {
|
|
|
|
IdentifierName string
|
|
|
|
}
|
|
|
|
|
|
|
|
type LabelToken struct {
|
|
|
|
LabelName string
|
|
|
|
IsGlobal bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type MovInstrToken struct {
|
|
|
|
Args []string
|
|
|
|
}
|
|
|
|
|
|
|
|
type SyscallInstrToken struct{}
|
|
|
|
|
2023-12-11 00:14:13 +00:00
|
|
|
type RetInstrToken struct{}
|
|
|
|
|
2023-12-09 03:12:45 +00:00
|
|
|
type DataVariableInstrToken struct {
|
|
|
|
VarName string
|
|
|
|
Sizeclass string // sz, u8, u16, u32, u64
|
|
|
|
Value string
|
|
|
|
}
|