# https://taskfile.dev version: '3' vars: APP_NAME: golox tasks: default: cmds: - task: run run: desc: "Run the interpreter" deps: [build] cmds: - ./bin/{{.APP_NAME}} {{.CLI_ARGS}} build: desc: "Build the interpreter" deps: [astgen] cmds: - go build -o bin/{{.APP_NAME}} cmd/golox/main.go test: desc: "Run tests" deps: [astgen] cmds: - go test ./... {{.CLI_ARGS}} astgen: desc: "Generate AST nodes" cmds: - go run cmd/astgen/main.go "./ast" sources: - cmd/astgen/main.go generates: - ast/expr.go - ast/stmt.go clean: desc: "Clean up" cmds: - rm -rf bin/*