some command line flags for builders

This commit is contained in:
Michael McLoughlin
2018-11-30 20:58:51 -08:00
parent 9b9f5b7e0c
commit 241b5ea673
2 changed files with 32 additions and 6 deletions

View File

@@ -20,9 +20,7 @@ func NewContext() *Context {
}
}
//go:generate avogen -output zinstructions.go build
func (c *Context) TEXT(name string) {
func (c *Context) Function(name string) {
c.function = avo.NewFunction(name)
c.file.Functions = append(c.file.Functions, c.function)
}
@@ -35,6 +33,8 @@ func (c *Context) Instruction(i avo.Instruction) {
c.function.AddInstruction(i)
}
//go:generate avogen -output zinstructions.go build
func (c *Context) AddError(err error) {
c.errs = append(c.errs, err)
}