-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
并且修复构建过程中申请的临时标记与编译过程中申请的临时标记重复
- Loading branch information
Showing
5 changed files
with
462 additions
and
56 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "mindustry_logic_bang_lang" | ||
version = "0.6.2" | ||
version = "0.7.0" | ||
edition = "2021" | ||
|
||
authors = ["A4-Tacks <[email protected]>"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#* 这里是介绍0.7.0版本加入的重要语法 | ||
cmps, 这个语法内部依照以前的命名JumpCmp, 然后被连接到CmpTree, | ||
是可以通过短路与, 短路或, 单目非将多个条件(JumpCmpBody)组织起来的语法 | ||
这可以使得我们写多条件运算变得很容易, | ||
无需像以前一样插入DExp并且不满足条件跳走来实现 | ||
短路与的符号为`&&`, 短路或的符号为`||`, 单目非的符号为`!` | ||
注意, 优先级严格递增为`||` < `&&` < `!` | ||
也就是说`a && b || !c && d`被加上等价的括号后为`(a && b) || ((!c) && d)` | ||
*# | ||
|
||
do { | ||
op i i + 1; | ||
} while i < 10 && (read $ cell1 i;) != 0; | ||
end; | ||
|
||
#* >>> | ||
op add i i 1 | ||
jump 4 greaterThanEq i 10 | ||
read __0 cell1 i | ||
jump 0 notEqual __0 0 | ||
end | ||
*# | ||
# 可以看到, 我们的多条件正确的生成了. | ||
# 我们可以在while skip goto do_while 等地方编写它 |
Oops, something went wrong.