提交 64315c08 编写于 作者: 3 3dgen

Merge branch 'master' of https://gitee.com/wa-lang/wa

# 版权 @2023 凹语言 作者。保留所有权利。
default:
go run ../../main.go yacc -l -p=expr -c=copyright.txt -o=y.wa expr.y
go run ../../main.go yacc -l -p=expr -c="copyright.txt" -o="y.wa" expr.y
go run ../../main.go y.wa
dev:
go run ../../main.go yacc -l -p=expr -c=copyright.txt -o=y.wa.go expr.y
go run ../../main.go yacc -l -p=expr -c="copyright.txt" -o="y.wa.go" expr.y
go run y.wa.go
clean:
:: 版权 @2023 凹语言 作者。保留所有权利。
setlocal
cd %~dp0
go run ../../main.go yacc -l -p=expr -c="copyright.txt" -o="y.wa" expr.y
go run ../../main.go "y.wa"
......@@ -2915,11 +2915,13 @@ func others() {
// Custom error messages.
fmt.Fprintf(ftable, "\n")
fmt.Fprintf(ftable, "var %sErrorMessages = [...]struct {\n", prefix)
fmt.Fprintf(ftable, "type %sErrorMessageInfo struct {\n", prefix)
fmt.Fprintf(ftable, "\tstate int\n")
fmt.Fprintf(ftable, "\ttoken int\n")
fmt.Fprintf(ftable, "\tmsg string\n")
fmt.Fprintf(ftable, "}{\n")
fmt.Fprintf(ftable, "}\n")
fmt.Fprintf(ftable, "var %sErrorMessages = [...]%sErrorMessageInfo {\n", prefix, prefix)
for _, error := range errors {
lineno = error.lineno
state, token := runMachine(error.tokens)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册