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.
- {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/PKG-INFO +1 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/PKG-INFO +1 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/__init__.py +1 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/cli/commands.py +26 -6
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_builtins.py +2 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_runtime.py +19 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/package.json +1 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/pyproject.toml +1 -1
- {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/SOURCES.txt +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/dependency_links.txt +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/entry_points.txt +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/requires.txt +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/IncludeCPP.egg-info/top_level.txt +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/LICENSE +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/MANIFEST.in +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/README.md +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/__init__.pyi +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/__main__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/cli/__init__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/cli/config_parser.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/__init__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/ai_integration.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/build_manager.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cpp_api.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cpp_api.pyi +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cppy_converter.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/CSSL_DOCUMENTATION.md +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/__init__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_builtins.pyi +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_events.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_modules.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_parser.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_syntax.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl/cssl_types.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl_bridge.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/cssl_bridge.pyi +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/error_catalog.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/error_formatter.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/exceptions.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/path_discovery.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/project_ui.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/core/settings_ui.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/__init__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/parser.cpp +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/parser.h +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/type_resolver.cpp +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/generator/type_resolver.h +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/py.typed +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/templates/cpp.proj.template +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/__init__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/__init__.py +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/extension.js +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/images/cssl.png +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/images/cssl_pl.png +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/language-configuration.json +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/snippets/cssl.snippets.json +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/requirements.txt +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/setup.cfg +0 -0
- {includecpp-3.7.27 → includecpp-3.8.1}/setup.py +0 -0
|
@@ -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
|
|
7935
|
-
includecpp vscode --force
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
+
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
|
|
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
|
|
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
|