You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
665 B
YAML

# 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 -v ./...
astgen:
desc: "Generate AST nodes"
cmds:
- go run cmd/astgen/main.go "./ast"
sources:
- cmd/astgen/main.go
generates:
- ast/expr.go
clean:
desc: "Clean up"
cmds:
- rm -rf bin/*