overpy 9.5.3 → 9.5.5
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.
- package/README.md +1 -1
- package/overpy.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -264,7 +264,7 @@ If a function is not in that list, then the name is the English name in camelCas
|
|
|
264
264
|
<code>Disable Movement Collision With Players</code> | <code><i>player</i>.disablePlayerCollision()</code>
|
|
265
265
|
<code>Divide(A, 3)</code> | <code>A / 3</code>
|
|
266
266
|
<code>Down</code> | <code>Vector.DOWN</code>
|
|
267
|
-
<code>Else</code> | <code>else:</code>
|
|
267
|
+
<code>Else</code> | <code>else:</code>
|
|
268
268
|
<code>Else If</code> | <code>elif:</code>
|
|
269
269
|
<code>Empty Array</code> | <code>[]</code>
|
|
270
270
|
<code>End</code> | Go back a level of indentation
|
package/overpy.js
CHANGED
|
@@ -44669,7 +44669,7 @@ astParsingFunctions.__elif__ = function(content) {
|
|
|
44669
44669
|
if (["__if__", "__elif__", "__else__"].includes(content.parent.name)) {
|
|
44670
44670
|
error("Found 'elif', but no 'if' or 'elif' before it");
|
|
44671
44671
|
}
|
|
44672
|
-
warn("w_lone_else", "Found '
|
|
44672
|
+
warn("w_lone_else", "Found 'elif', but no 'if' or 'elif' before it");
|
|
44673
44673
|
}
|
|
44674
44674
|
if (content.parent.childIndex === 0 || ["__else__"].includes(content.parent.children[content.parent.childIndex - 1].name)) {
|
|
44675
44675
|
warn("w_lone_elif", "Found 'elif' directly after an 'else'");
|
|
@@ -45411,6 +45411,15 @@ astParsingFunctions.__rule__ = function(content) {
|
|
|
45411
45411
|
}
|
|
45412
45412
|
}
|
|
45413
45413
|
}
|
|
45414
|
+
if (children[i2].name === "__elif__") {
|
|
45415
|
+
if (isDefinitelyFalsy(children[i2].args[0]) && (children[i2].children.length === 0 || !isGotoEncountered)) {
|
|
45416
|
+
if (i2 > 0 && (children[i2 - 1].name === "__if__" || children[i2 - 1].name === "__elif__")) {
|
|
45417
|
+
children.splice(i2, 1);
|
|
45418
|
+
i2--;
|
|
45419
|
+
continue;
|
|
45420
|
+
}
|
|
45421
|
+
}
|
|
45422
|
+
}
|
|
45414
45423
|
if (children[i2].name === "__if__" || children[i2].name === "__elif__") {
|
|
45415
45424
|
if (isDefinitelyTruthy(children[i2].args[0]) && !isGotoEncountered) {
|
|
45416
45425
|
while (i2 < children.length - 1 && (children[i2 + 1].name === "__else__" || children[i2 + 1].name === "__elif__" || children[i2 + 1].name === "__end__")) {
|
package/package.json
CHANGED