-
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
14 changed files
with
387 additions
and
28 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.15.2" | ||
version = "0.15.3" | ||
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
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,46 @@ | ||
#** | ||
* 这是0.15.3添加的语法, 可以在const追溯时, 拿到某个值的绑定值 | ||
* 并且不对绑定值进行take. 用于简化2至3行的内建调用 | ||
* | ||
* 语法大致为`Value->Name`, 并且Name的位置还可以有两个特殊值 | ||
* 如果是`..`, 那么将返回其绑定者, 这只会对箭头左边的值进行常量追溯而不是take | ||
* 如果是`$`, 那么将其take并返回其句柄, 这在一些const时想要take很好用 | ||
* | ||
* 返回绑定者的值只会进行常量追溯而不是进行take | ||
*# | ||
|
||
const bind.Fun = ( | ||
print "make"; | ||
setres 3; | ||
); | ||
print 1; | ||
const Fun = bind->Fun; | ||
print 2 Fun Fun->..; | ||
#* >>> | ||
print 1 | ||
print 2 | ||
print "make" | ||
print 3 | ||
print bind | ||
*# | ||
|
||
|
||
const bind.X = (x: print "makeX";); | ||
const bind.Y = (y: print "makeY";); | ||
print 1; | ||
const X = bind->X; | ||
print 2 X; | ||
const Y = X->..->Y; | ||
print 3 Y; | ||
print X->.. Y->..; | ||
#* >>> | ||
print 1 | ||
print 2 | ||
print "makeX" | ||
print x | ||
print 3 | ||
print "makeY" | ||
print y | ||
print bind | ||
print bind | ||
*# |
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
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
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
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
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
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
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
Oops, something went wrong.