pyscreeps-arena 0.5.9b4__py3-none-any.whl → 0.5.9b5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyscreeps_arena/compiler.py +6 -5
- pyscreeps_arena/project.7z +0 -0
- {pyscreeps_arena-0.5.9b4.dist-info → pyscreeps_arena-0.5.9b5.dist-info}/METADATA +1 -1
- {pyscreeps_arena-0.5.9b4.dist-info → pyscreeps_arena-0.5.9b5.dist-info}/RECORD +7 -7
- {pyscreeps_arena-0.5.9b4.dist-info → pyscreeps_arena-0.5.9b5.dist-info}/WHEEL +0 -0
- {pyscreeps_arena-0.5.9b4.dist-info → pyscreeps_arena-0.5.9b5.dist-info}/entry_points.txt +0 -0
- {pyscreeps_arena-0.5.9b4.dist-info → pyscreeps_arena-0.5.9b5.dist-info}/top_level.txt +0 -0
pyscreeps_arena/compiler.py
CHANGED
|
@@ -18,7 +18,6 @@ python_version_info = sys.version_info
|
|
|
18
18
|
python_version_info = f"{python_version_info.major}.{python_version_info.minor}.{python_version_info.micro}"
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
class MatchCaseError(Exception):
|
|
23
22
|
pass
|
|
24
23
|
|
|
@@ -111,7 +110,7 @@ export var loop = function () {
|
|
|
111
110
|
if (know.now === 1) {
|
|
112
111
|
std.show_welcome();
|
|
113
112
|
init (know);
|
|
114
|
-
|
|
113
|
+
|
|
115
114
|
}
|
|
116
115
|
step (know);
|
|
117
116
|
timeLine = get.cpu_us();
|
|
@@ -669,7 +668,7 @@ class Compiler_Utils(Compiler_Const):
|
|
|
669
668
|
|
|
670
669
|
# 2. 查找所有 @<caller_name>(...) 装饰器(支持多行参数)
|
|
671
670
|
decorator_pattern = re.compile(
|
|
672
|
-
r'^\s*@\s*' + re.escape(caller_name) + r'\s*\((.*?)\)\s*$\n?',
|
|
671
|
+
r'^\s*@\s*' + re.escape(caller_name) + r'\s*\((.*?)\)\s*$\n?',
|
|
673
672
|
re.MULTILINE | re.DOTALL
|
|
674
673
|
)
|
|
675
674
|
|
|
@@ -1000,6 +999,8 @@ class Compiler(CompilerBase):
|
|
|
1000
999
|
|
|
1001
1000
|
# 将PYFILE_PRAGMA_INSERTS.replace("\t", "").replace(" ", "")插入到文件开头
|
|
1002
1001
|
content = self.auto_read(fpath)
|
|
1002
|
+
# 移除"""$..."""代码块
|
|
1003
|
+
content = re.sub(r'"""\$[\s\S]*?"""', '', content)
|
|
1003
1004
|
content = self.PYFILE_PRAGMA_INSERTS.replace("\t", "").replace(" ", "") + content
|
|
1004
1005
|
# content = self.remove_long_docstring(content) # 移除长注释 | remove long docstring
|
|
1005
1006
|
|
|
@@ -1514,7 +1515,7 @@ if __name__ == '__main__':
|
|
|
1514
1515
|
# compiler.compile()
|
|
1515
1516
|
# compiler.clean()
|
|
1516
1517
|
test = """
|
|
1517
|
-
|
|
1518
|
+
|
|
1518
1519
|
def patrolling(self, c: Creep):
|
|
1519
1520
|
e = self.center.nearest(k.civilian.enemies, 5)
|
|
1520
1521
|
if e:
|
|
@@ -1524,6 +1525,6 @@ def patrolling(self, c: Creep):
|
|
|
1524
1525
|
):
|
|
1525
1526
|
case True: c.move(e, SWAMP_MOTION)
|
|
1526
1527
|
case False: c.move(self.bpos, SWAMP_MOTION)
|
|
1527
|
-
|
|
1528
|
+
|
|
1528
1529
|
"""
|
|
1529
1530
|
print(f"res=\n{Compiler.convert_match_to_if(test)}")
|
pyscreeps_arena/project.7z
CHANGED
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
pyscreeps_arena/__init__.py,sha256=GWrCpZnrzPwbBzhNqk8gTvV4VSwkP2DbxK8lR0E_SzY,3223
|
|
2
2
|
pyscreeps_arena/build.py,sha256=DQeGLnID2FjpsWTbnqwt2cOp28olWK68U67bfbFJSOU,177
|
|
3
|
-
pyscreeps_arena/compiler.py,sha256=
|
|
3
|
+
pyscreeps_arena/compiler.py,sha256=sddY_09Nvq0Ts86lmjLlsKOT0b-EWnhsKK04oIRvnDc,70671
|
|
4
4
|
pyscreeps_arena/localization.py,sha256=Dr0G6n8DvT6syfC0urqwjccYpEPEfcwYyJx3f9s-6a8,6031
|
|
5
|
-
pyscreeps_arena/project.7z,sha256=
|
|
5
|
+
pyscreeps_arena/project.7z,sha256=p_67v86Q2XOZHcmwaJ7hBKmtpjE6YZAUCQSRnQ4-Y6Y,542738
|
|
6
6
|
pyscreeps_arena/afters/__init__.py,sha256=Ze8NKQoMEzIJ3WlyR8Jhhdq21gSXJUtGoINzB8iaQyE,254
|
|
7
7
|
pyscreeps_arena/afters/after_config.py,sha256=Tw8Qry0KAM3hDasmXArKoS1crPuwfiAfWiEeAcKrPdo,2455
|
|
8
8
|
pyscreeps_arena/afters/after_custom.py,sha256=pgI5xkY4X7w_NHFufQ5PUGxpCrv9Ayw6VWFwVJCHLFw,3226
|
|
@@ -45,8 +45,8 @@ pyscreeps_arena/ui/qmapv/test_simple_array.py,sha256=hPnLXcFrn6I1X4JXFM3RVpBPhU_
|
|
|
45
45
|
pyscreeps_arena/ui/qrecipe/__init__.py,sha256=2Guvr9k5kGkZboiVC0aNF4u48LRbmcCm2dqOhEF52Tw,59
|
|
46
46
|
pyscreeps_arena/ui/qrecipe/model.py,sha256=s3lr_DXtsBgt8bVg1_wLz-dX88QKi77mNkqM5VJsGwE,13200
|
|
47
47
|
pyscreeps_arena/ui/qrecipe/qrecipe.py,sha256=z57VLmlpMripdpGtVCkKR0csJQhw5-WpocZK5l2xTVg,39398
|
|
48
|
-
pyscreeps_arena-0.5.
|
|
49
|
-
pyscreeps_arena-0.5.
|
|
50
|
-
pyscreeps_arena-0.5.
|
|
51
|
-
pyscreeps_arena-0.5.
|
|
52
|
-
pyscreeps_arena-0.5.
|
|
48
|
+
pyscreeps_arena-0.5.9b5.dist-info/METADATA,sha256=_O8T8P24GU-OCJVVxmQM41WKU3nj2aOr-t3Ak6qDQ0g,2356
|
|
49
|
+
pyscreeps_arena-0.5.9b5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
50
|
+
pyscreeps_arena-0.5.9b5.dist-info/entry_points.txt,sha256=pnpuPPadwQsxQPaR1rXzUo0fUvhOcC7HTHlf7TYXr7M,141
|
|
51
|
+
pyscreeps_arena-0.5.9b5.dist-info/top_level.txt,sha256=l4uLyMR2NOy41ngBMh795jOHTFk3tgYKy64-9cgjVng,16
|
|
52
|
+
pyscreeps_arena-0.5.9b5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|