inscript-lang 1.9.4__tar.gz → 1.9.5__tar.gz
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.
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/PKG-INFO +1 -1
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/errors.py +2 -1
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript.py +4 -3
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/PKG-INFO +1 -1
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/parser.py +7 -1
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/pyproject.toml +1 -1
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/repl.py +1 -1
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/README.md +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/analyzer.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/ast_nodes.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/compiler.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/environment.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_fmt.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/SOURCES.txt +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/dependency_links.txt +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/entry_points.txt +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/requires.txt +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/top_level.txt +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_test.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/interpreter.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/lexer.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/pygame_backend.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/setup.cfg +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/setup.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_extended.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_extended_2.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_game.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_values.py +0 -0
- {inscript_lang-1.9.4 → inscript_lang-1.9.5}/vm.py +0 -0
|
@@ -54,8 +54,9 @@ ERROR_CODES = {
|
|
|
54
54
|
"PropertyError": "E0048",
|
|
55
55
|
"NilAccess": "E0049",
|
|
56
56
|
|
|
57
|
-
# Deprecated-keyword hard errors (v1.7.4)
|
|
57
|
+
# Deprecated-keyword hard errors (v1.7.4+)
|
|
58
58
|
"NullKeyword": "E0055",
|
|
59
|
+
"DivKeyword": "E0056",
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
DOCS_BASE = "https://docs.inscript.dev/errors"
|
|
@@ -24,7 +24,7 @@ from errors import (InScriptError, LexerError, ParseError,
|
|
|
24
24
|
SemanticError, InScriptRuntimeError,
|
|
25
25
|
MultiError, InScriptWarning)
|
|
26
26
|
|
|
27
|
-
VERSION = "1.9.
|
|
27
|
+
VERSION = "1.9.5"
|
|
28
28
|
LANG = "InScript"
|
|
29
29
|
PACKAGES_DIR = os.path.join(os.path.expanduser("~"), ".inscript", "packages")
|
|
30
30
|
REGISTRY_URL = "https://raw.githubusercontent.com/authorss81/inscript-packages/main/registry.json"
|
|
@@ -256,9 +256,9 @@ def _compat_files(path: str) -> int:
|
|
|
256
256
|
|
|
257
257
|
CHECKS = [
|
|
258
258
|
(_re.compile(r'\bnull\b'),
|
|
259
|
-
"use of 'null' — removed in
|
|
259
|
+
"use of 'null' — removed in v1.7.4, use 'nil'"),
|
|
260
260
|
(_re.compile(r'\bdiv\b'),
|
|
261
|
-
"use of 'div' operator — removed in
|
|
261
|
+
"use of 'div' operator — removed in v1.9.5 (hard error), use '//' for floor division"),
|
|
262
262
|
(_re.compile(r':\s*\[\]'),
|
|
263
263
|
"bare ':[]' type annotation — use ':array' or ':[T]' with element type"),
|
|
264
264
|
(_re.compile(r'\barray\b(?!\s*<)(?!\s*\[)'),
|
|
@@ -786,6 +786,7 @@ ERROR_CATALOGUE = {
|
|
|
786
786
|
"E0053": ("ConstInLoop", "const declaration inside a loop"),
|
|
787
787
|
"E0054": ("NeverNotDiverging", "Function declared -> never but has a non-throwing path"),
|
|
788
788
|
"E0055": ("NullKeyword", "'null' keyword removed in v1.7.4 — use 'nil'"),
|
|
789
|
+
"E0056": ("DivKeyword", "'div' keyword removed in v1.9.5 — use '//' for integer division"),
|
|
789
790
|
}
|
|
790
791
|
|
|
791
792
|
|
|
@@ -1610,7 +1610,13 @@ class Parser:
|
|
|
1610
1610
|
left = self.parse_unary() # BUG-09 fix: call parse_unary (was parse_power)
|
|
1611
1611
|
while self.check(TT.STAR, TT.SLASH, TT.SLASH_SLASH, TT.PERCENT) or self.check(TT.DIV):
|
|
1612
1612
|
op_tok = self.advance()
|
|
1613
|
-
|
|
1613
|
+
if op_tok.type == TT.DIV:
|
|
1614
|
+
self._error(
|
|
1615
|
+
"[E0056] 'div' was removed in v1.9.5 — use '//' for integer division. "
|
|
1616
|
+
"Run: inscript migrate <file> to auto-fix.",
|
|
1617
|
+
op_tok
|
|
1618
|
+
)
|
|
1619
|
+
op = op_tok.value
|
|
1614
1620
|
right = self.parse_unary()
|
|
1615
1621
|
left = BinaryExpr(left=left, op=op, right=right,
|
|
1616
1622
|
line=line, col=col)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "inscript-lang"
|
|
7
|
-
version = "1.9.
|
|
7
|
+
version = "1.9.5"
|
|
8
8
|
description = "InScript — a game-focused scripting language with 59 game modules and a bytecode VM"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -40,7 +40,7 @@ sys.path.insert(0, str(Path(__file__).parent))
|
|
|
40
40
|
|
|
41
41
|
HISTORY_FILE = Path.home() / ".inscript" / "history"
|
|
42
42
|
HISTORY_FILE.parent.mkdir(parents=True, exist_ok=True)
|
|
43
|
-
VERSION = "1.9.
|
|
43
|
+
VERSION = "1.9.5"
|
|
44
44
|
|
|
45
45
|
# ── ANSI colours ──────────────────────────────────────────────────────────────
|
|
46
46
|
def _c(code, text):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|