This commit is contained in:
Michael McLoughlin
2018-11-20 11:44:44 -06:00
parent 33ef56f40e
commit 7c2990754f
7 changed files with 2519 additions and 4 deletions

14
ast.go
View File

@@ -1,5 +1,9 @@
package avo
type Asm interface {
Asm() string
}
// GoType represents a Golang type.
type GoType interface{}
@@ -9,10 +13,18 @@ type Parameter struct {
Type GoType
}
type Operand interface {
Asm
}
// Instruction is a single instruction in a function.
type Instruction struct {
Mnemonic string
Operands []string
Operands []Operand
}
type Node interface {
Asm
}
// File represents an assembly file.