-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
45 lines (40 loc) · 844 Bytes
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: 3
tasks:
default:
cmds:
- task: generate-parser
- go build
sources:
- Expr.g4
- '**/*.go'
generates:
- expr
desc: Builds the project.
generate-parser:
cmds:
- task: clean
- antlr4 -Dlanguage=Go -o parser -no-listener -visitor Expr.g4
sources:
- Expr.g4
generates:
- parser/*
status:
- test -d parser
desc: Generates the parser.
tests:
sources:
- test/test*.txt
cmds:
- for: sources
cmd: ./expr {{.ITEM}}
ignore_error: true
deps:
- default
desc: Tests the parser against some test files.
clean:
cmds:
- rm -f expr
- rm -rf parser
silent: true
desc: Removes binary and generated parser files.