Skip to content

Commit

Permalink
ci: 不再现场生成编译器代码,而是使用已有的
Browse files Browse the repository at this point in the history
  • Loading branch information
fy0 committed May 14, 2024
1 parent 538b85c commit b7140f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/jsport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@ jobs:
with:
go-version: 1.18

- name: Install peg
run: |
go install github.com/fy0/pigeon@latest
- name: Install gopherjs
run: |
go get -u github.com/gopherjs/gopherjs@v1.18.0-beta1
go install github.com/gopherjs/gopherjs@v1.18.0-beta1
- name: Code gen
run: pigeon -nolint -optimize-parser -o roll.peg.go roll.peg

- name: Build
run: gopherjs build github.com/sealdice/dicescript/jsport -o jsport/dicescript.cjs

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
with:
go-version: '1.18'

- run: go install github.com/fy0/pigeon@latest
- run: pigeon -nolint -optimize-parser -o roll.peg.go roll.peg
- run: go mod tidy
- run: go get
- run: go generate ./...
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,11 @@ DiceScript将使用和RollVM相同的技术栈,但会有更好的接口设计

* d2d(4d4d5)d6 计算过程问题
* 处理

## 开发

如果修改了文法:
```
go install github.com/fy0/pigeon@latest
pigeon -nolint -optimize-parser -optimize-ref-expr-by-index -o .\roll.peg.go .\roll.peg
```

0 comments on commit b7140f6

Please sign in to comment.