add label type

This commit is contained in:
Michael McLoughlin
2018-11-30 21:37:17 -08:00
parent 241b5ea673
commit 0ba8a60ea5
5 changed files with 49 additions and 993 deletions

View File

@@ -5,12 +5,15 @@ import (
"io"
"log"
"os"
"github.com/mmcloughlin/avo"
)
// ctx provides a global build context.
var ctx = NewContext()
func TEXT(name string) { ctx.Function(name) }
func TEXT(name string) { ctx.Function(name) }
func LABEL(name string) { ctx.Label(avo.Label(name)) }
var (
output = flag.String("output", "", "output filename (default stdout)")
@@ -31,5 +34,5 @@ func EOF() {
}
}
ctx.Generate(w, os.Stderr)
os.Exit(ctx.Main(w, os.Stderr))
}