IncludeCPP 3.7.27__tar.gz → 3.8.1__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 (60) hide show
  1. {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/PKG-INFO +1 -1
  2. {includecpp-3.7.27 → includecpp-3.8.1}/PKG-INFO +1 -1
  3. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/__init__.py +1 -1
  4. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/cli/commands.py +26 -6
  5. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_builtins.py +2 -1
  6. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_runtime.py +19 -1
  7. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/package.json +1 -1
  8. {includecpp-3.7.27 → includecpp-3.8.1}/pyproject.toml +1 -1
  9. {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/SOURCES.txt +0 -0
  10. {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/dependency_links.txt +0 -0
  11. {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/entry_points.txt +0 -0
  12. {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/requires.txt +0 -0
  13. {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/top_level.txt +0 -0
  14. {includecpp-3.7.27 → includecpp-3.8.1}/LICENSE +0 -0
  15. {includecpp-3.7.27 → includecpp-3.8.1}/MANIFEST.in +0 -0
  16. {includecpp-3.7.27 → includecpp-3.8.1}/README.md +0 -0
  17. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/__init__.pyi +0 -0
  18. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/__main__.py +0 -0
  19. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/cli/__init__.py +0 -0
  20. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/cli/config_parser.py +0 -0
  21. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/__init__.py +0 -0
  22. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/ai_integration.py +0 -0
  23. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/build_manager.py +0 -0
  24. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cpp_api.py +0 -0
  25. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cpp_api.pyi +0 -0
  26. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cppy_converter.py +0 -0
  27. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/CSSL_DOCUMENTATION.md +0 -0
  28. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/__init__.py +0 -0
  29. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_builtins.pyi +0 -0
  30. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_events.py +0 -0
  31. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_modules.py +0 -0
  32. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_parser.py +0 -0
  33. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_syntax.py +0 -0
  34. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_types.py +0 -0
  35. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl_bridge.py +0 -0
  36. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl_bridge.pyi +0 -0
  37. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/error_catalog.py +0 -0
  38. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/error_formatter.py +0 -0
  39. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/exceptions.py +0 -0
  40. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/path_discovery.py +0 -0
  41. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/project_ui.py +0 -0
  42. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/settings_ui.py +0 -0
  43. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/__init__.py +0 -0
  44. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/parser.cpp +0 -0
  45. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/parser.h +0 -0
  46. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/type_resolver.cpp +0 -0
  47. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/type_resolver.h +0 -0
  48. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/py.typed +0 -0
  49. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/templates/cpp.proj.template +0 -0
  50. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/__init__.py +0 -0
  51. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/__init__.py +0 -0
  52. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/extension.js +0 -0
  53. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/images/cssl.png +0 -0
  54. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/images/cssl_pl.png +0 -0
  55. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/language-configuration.json +0 -0
  56. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/snippets/cssl.snippets.json +0 -0
  57. {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +0 -0
  58. {includecpp-3.7.27 → includecpp-3.8.1}/requirements.txt +0 -0
  59. {includecpp-3.7.27 → includecpp-3.8.1}/setup.cfg +0 -0
  60. {includecpp-3.7.27 → includecpp-3.8.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.7.27
3
+ Version: 3.8.1
4
4
  Summary: Professional C++ Python bindings with type-generic templates, pystubs and native threading
5
5
  Home-page: https://github.com/liliassg/IncludeCPP
6
6
  Author: Lilias Hatterscheidt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.7.27
3
+ Version: 3.8.1
4
4
  Summary: Professional C++ Python bindings with type-generic templates, pystubs and native threading
5
5
  Home-page: https://github.com/liliassg/IncludeCPP
6
6
  Author: Lilias Hatterscheidt
@@ -2,7 +2,7 @@ from .core.cpp_api import CppApi
2
2
  from .core import cssl_bridge as CSSL
3
3
  import warnings
4
4
 
5
- __version__ = "3.7.27"
5
+ __version__ = "3.8.1"
6
6
  __all__ = ["CppApi", "CSSL"]
7
7
 
8
8
  # Module-level cache for C++ modules
@@ -7457,11 +7457,24 @@ def cssl():
7457
7457
  pass
7458
7458
 
7459
7459
 
7460
+ @cssl.command(name='run')
7461
+ @click.argument('path', required=False, type=click.Path())
7462
+ @click.option('--code', '-c', type=str, help='Execute code directly')
7463
+ def cssl_run(path, code):
7464
+ """Run/execute CSSL code or file."""
7465
+ _cssl_execute(path, code)
7466
+
7467
+
7460
7468
  @cssl.command(name='exec')
7461
7469
  @click.argument('path', required=False, type=click.Path())
7462
7470
  @click.option('--code', '-c', type=str, help='Execute code directly')
7463
7471
  def cssl_exec(path, code):
7464
- """Execute CSSL code or file."""
7472
+ """Execute CSSL code or file (alias for 'run')."""
7473
+ _cssl_execute(path, code)
7474
+
7475
+
7476
+ def _cssl_execute(path, code):
7477
+ """Internal: Execute CSSL code or file."""
7465
7478
  from pathlib import Path as PathLib
7466
7479
 
7467
7480
  try:
@@ -7923,16 +7936,18 @@ cli.add_command(cssl)
7923
7936
 
7924
7937
  @cli.command()
7925
7938
  @click.option('--force', '-f', is_flag=True, help='Force overwrite existing files')
7939
+ @click.option('--reinstall', '-r', is_flag=True, help='Reinstall extension (removes all versions first)')
7926
7940
  @click.option('--stubs-only', is_flag=True, help='Only update stubs, skip extension files')
7927
- def vscode(force, stubs_only):
7941
+ def vscode(force, reinstall, stubs_only):
7928
7942
  """Initialize or update VSCode configuration for IncludeCPP/CSSL.
7929
7943
 
7930
7944
  Installs CSSL extension globally and sets up project stubs.
7931
7945
 
7932
7946
  \b
7933
7947
  Usage:
7934
- includecpp vscode # Install/update extension + stubs
7935
- includecpp vscode --force # Force reinstall extension
7948
+ includecpp vscode # Install/update extension + stubs
7949
+ includecpp vscode --force # Force reinstall extension
7950
+ includecpp vscode --reinstall # Remove ALL versions & reinstall fresh
7936
7951
  includecpp vscode --stubs-only # Only update stubs
7937
7952
 
7938
7953
  \b
@@ -7999,13 +8014,18 @@ def vscode(force, stubs_only):
7999
8014
  target_dir = global_ext_dir / f'includecpp.cssl-{current_version}'
8000
8015
 
8001
8016
  # Check if already installed with same or older version
8002
- needs_install = force
8017
+ needs_install = force or reinstall
8003
8018
  existing_version = None
8004
8019
 
8005
8020
  # Find existing installations
8006
8021
  for existing in global_ext_dir.glob('includecpp.cssl-*'):
8007
8022
  existing_version = existing.name.split('-')[-1]
8008
- if existing_version != current_version:
8023
+ if reinstall:
8024
+ # --reinstall: Remove ALL versions
8025
+ click.echo(f" Removing version: {existing_version}")
8026
+ shutil.rmtree(existing)
8027
+ needs_install = True
8028
+ elif existing_version != current_version:
8009
8029
  # Remove old version
8010
8030
  click.echo(f" Removing old version: {existing_version}")
8011
8031
  shutil.rmtree(existing)
@@ -2612,7 +2612,8 @@ class PythonizedMethod:
2612
2612
  raise RuntimeError(f"Cannot call method '{self._method_name}' - no runtime available")
2613
2613
 
2614
2614
  # Execute the method through the runtime
2615
- result = self._runtime._call_method(self._instance, self._method_name, list(args))
2615
+ # Pass the method AST node, not the method name
2616
+ result = self._runtime._call_method(self._instance, self._method_ast, list(args), kwargs)
2616
2617
 
2617
2618
  # Pythonize the result if it's a CSSL instance
2618
2619
  from .cssl_types import CSSLInstance
@@ -2186,7 +2186,12 @@ class CSSLRuntime:
2186
2186
 
2187
2187
  if isinstance(target, ASTNode):
2188
2188
  if target.type == 'identifier':
2189
- self.scope.set(target.value, value)
2189
+ # Check if we're in a class method and this is a class member
2190
+ # If so, set the member instead of creating a local variable
2191
+ if self._current_instance is not None and self._current_instance.has_member(target.value):
2192
+ self._current_instance.set_member(target.value, value)
2193
+ else:
2194
+ self.scope.set(target.value, value)
2190
2195
  elif target.type == 'global_ref':
2191
2196
  # r@Name = value - store in promoted globals
2192
2197
  self._promoted_globals[target.value] = value
@@ -2303,6 +2308,9 @@ class CSSLRuntime:
2303
2308
 
2304
2309
  if node.type == 'literal':
2305
2310
  value = node.value
2311
+ # Handle dict-format literals from parser: {'type': 'int', 'value': 0}
2312
+ if isinstance(value, dict) and 'value' in value:
2313
+ value = value['value']
2306
2314
  # String interpolation - replace {var} or <var> with scope values
2307
2315
  if isinstance(value, str):
2308
2316
  has_fstring = '{' in value and '}' in value
@@ -2323,6 +2331,16 @@ class CSSLRuntime:
2323
2331
  if node.type == 'identifier':
2324
2332
  name = node.value
2325
2333
  value = self.scope.get(name)
2334
+ # Check if it's a class member in current instance context
2335
+ # This allows accessing members without 'this->' inside methods
2336
+ if value is None and self._current_instance is not None:
2337
+ if self._current_instance.has_member(name):
2338
+ value = self._current_instance.get_member(name)
2339
+ elif self._current_instance.has_method(name):
2340
+ # Return bound method
2341
+ method_node = self._current_instance.get_method(name)
2342
+ instance = self._current_instance
2343
+ value = lambda *args, **kwargs: self._call_method(instance, method_node, list(args), kwargs)
2326
2344
  # Fallback to global scope
2327
2345
  if value is None:
2328
2346
  value = self.global_scope.get(name)
@@ -2,7 +2,7 @@
2
2
  "name": "cssl",
3
3
  "displayName": "CSSL Language",
4
4
  "description": "Professional syntax highlighting, snippets, and language support for CSSL scripts (.cssl, .cssl-pl, .cssl-mod)",
5
- "version": "1.3.0",
5
+ "version": "1.3.1",
6
6
  "publisher": "IncludeCPP",
7
7
  "icon": "images/cssl.png",
8
8
  "engines": {
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "IncludeCPP"
7
- version = "3.7.27"
7
+ version = "3.8.1"
8
8
  description = "Professional C++ Python bindings with type-generic templates, pystubs and native threading"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes