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.
Files changed (30) hide show
  1. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/PKG-INFO +1 -1
  2. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/errors.py +2 -1
  3. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript.py +4 -3
  4. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/PKG-INFO +1 -1
  5. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/parser.py +7 -1
  6. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/pyproject.toml +1 -1
  7. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/repl.py +1 -1
  8. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/README.md +0 -0
  9. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/analyzer.py +0 -0
  10. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/ast_nodes.py +0 -0
  11. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/compiler.py +0 -0
  12. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/environment.py +0 -0
  13. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_fmt.py +0 -0
  14. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/SOURCES.txt +0 -0
  15. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/dependency_links.txt +0 -0
  16. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/entry_points.txt +0 -0
  17. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/requires.txt +0 -0
  18. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_lang.egg-info/top_level.txt +0 -0
  19. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/inscript_test.py +0 -0
  20. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/interpreter.py +0 -0
  21. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/lexer.py +0 -0
  22. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/pygame_backend.py +0 -0
  23. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/setup.cfg +0 -0
  24. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/setup.py +0 -0
  25. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib.py +0 -0
  26. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_extended.py +0 -0
  27. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_extended_2.py +0 -0
  28. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_game.py +0 -0
  29. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/stdlib_values.py +0 -0
  30. {inscript_lang-1.9.4 → inscript_lang-1.9.5}/vm.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inscript-lang
3
- Version: 1.9.4
3
+ Version: 1.9.5
4
4
  Summary: InScript — a game-focused scripting language with 59 game modules and a bytecode VM
5
5
  Author: Shreyasi Sarkar
6
6
  License: MIT
@@ -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.4"
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 v2.0.0, use 'nil'"),
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 v2.0.0, use '//' for floor division"),
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inscript-lang
3
- Version: 1.9.4
3
+ Version: 1.9.5
4
4
  Summary: InScript — a game-focused scripting language with 59 game modules and a bytecode VM
5
5
  Author: Shreyasi Sarkar
6
6
  License: MIT
@@ -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
- op = "//" if op_tok.type == TT.DIV else op_tok.value
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.4"
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.4"
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