IncludeCPP 3.5.7__tar.gz → 3.5.9__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.5.7 → includecpp-3.5.9}/IncludeCPP.egg-info/PKG-INFO +1 -1
- {includecpp-3.5.7 → includecpp-3.5.9}/PKG-INFO +1 -1
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/__init__.py +1 -1
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_parser.py +4 -4
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_runtime.py +47 -11
- {includecpp-3.5.7 → includecpp-3.5.9}/pyproject.toml +1 -1
- {includecpp-3.5.7 → includecpp-3.5.9}/IncludeCPP.egg-info/SOURCES.txt +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/IncludeCPP.egg-info/dependency_links.txt +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/IncludeCPP.egg-info/entry_points.txt +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/IncludeCPP.egg-info/requires.txt +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/IncludeCPP.egg-info/top_level.txt +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/LICENSE +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/MANIFEST.in +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/README.md +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/__init__.pyi +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/__main__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/cli/__init__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/cli/commands.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/cli/config_parser.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/__init__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/ai_integration.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/build_manager.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cpp_api.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cpp_api.pyi +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cppy_converter.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/CSSL_DOCUMENTATION.md +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/__init__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_builtins.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_events.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_modules.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_syntax.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl/cssl_types.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl_bridge.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/cssl_bridge.pyi +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/error_catalog.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/error_formatter.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/exceptions.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/path_discovery.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/project_ui.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/core/settings_ui.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/generator/__init__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/generator/parser.cpp +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/generator/parser.h +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/generator/type_resolver.cpp +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/generator/type_resolver.h +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/py.typed +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/templates/cpp.proj.template +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/vscode/__init__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/vscode/cssl/__init__.py +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/vscode/cssl/language-configuration.json +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/vscode/cssl/package.json +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/requirements.txt +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/setup.cfg +0 -0
- {includecpp-3.5.7 → includecpp-3.5.9}/setup.py +0 -0
|
@@ -559,10 +559,10 @@ class CSSLLexer:
|
|
|
559
559
|
elif self._peek(1) == '=' and self._peek(2) == '>' and self._peek(3) == '+':
|
|
560
560
|
self._add_token(TokenType.INJECT_PLUS_RIGHT, '==>+')
|
|
561
561
|
for _ in range(4): self._advance()
|
|
562
|
-
# Check for
|
|
563
|
-
elif self._peek(1) == '=' and self._peek(2) == '
|
|
564
|
-
self._add_token(TokenType.INJECT_MINUS_RIGHT, '
|
|
565
|
-
for _ in range(
|
|
562
|
+
# Check for ==>- (injection right minus - moves & removes)
|
|
563
|
+
elif self._peek(1) == '=' and self._peek(2) == '>' and self._peek(3) == '-':
|
|
564
|
+
self._add_token(TokenType.INJECT_MINUS_RIGHT, '==>-')
|
|
565
|
+
for _ in range(4): self._advance()
|
|
566
566
|
# Check for ==> (basic injection right)
|
|
567
567
|
elif self._peek(1) == '=' and self._peek(2) == '>':
|
|
568
568
|
self._add_token(TokenType.INJECT_RIGHT, '==>')
|
|
@@ -1138,21 +1138,49 @@ class CSSLRuntime:
|
|
|
1138
1138
|
elif isinstance(result, list):
|
|
1139
1139
|
result = [item for item in result if isinstance(item, str) and len(item) == filter_val]
|
|
1140
1140
|
elif helper == 'cut':
|
|
1141
|
-
# Cut string
|
|
1141
|
+
# Cut string - returns the part BEFORE the index/substring
|
|
1142
1142
|
# x = <==[string::cut=2] "20:200-1" --> x = "20"
|
|
1143
|
+
# x = <==[string::cut="1.0"] "1.0.0" --> x = "" (before "1.0")
|
|
1143
1144
|
if isinstance(result, str):
|
|
1144
|
-
|
|
1145
|
-
|
|
1145
|
+
if isinstance(filter_val, str):
|
|
1146
|
+
# Cut at substring position
|
|
1147
|
+
idx = result.find(filter_val)
|
|
1148
|
+
result = result[:idx] if idx >= 0 else result
|
|
1149
|
+
else:
|
|
1150
|
+
# Cut at integer index
|
|
1151
|
+
idx = int(filter_val)
|
|
1152
|
+
result = result[:idx] if 0 <= idx <= len(result) else result
|
|
1146
1153
|
elif isinstance(result, list):
|
|
1147
|
-
|
|
1154
|
+
def cut_item(item):
|
|
1155
|
+
if not isinstance(item, str):
|
|
1156
|
+
return item
|
|
1157
|
+
if isinstance(filter_val, str):
|
|
1158
|
+
idx = item.find(filter_val)
|
|
1159
|
+
return item[:idx] if idx >= 0 else item
|
|
1160
|
+
return item[:int(filter_val)]
|
|
1161
|
+
result = [cut_item(item) for item in result]
|
|
1148
1162
|
elif helper == 'cutAfter':
|
|
1149
|
-
# Get the part AFTER the index
|
|
1163
|
+
# Get the part AFTER the index/substring
|
|
1150
1164
|
# x = <==[string::cutAfter=2] "20:200-1" --> x = ":200-1"
|
|
1165
|
+
# x = <==[string::cutAfter="1.0"] "1.0.0" --> x = ".0" (after "1.0")
|
|
1151
1166
|
if isinstance(result, str):
|
|
1152
|
-
|
|
1153
|
-
|
|
1167
|
+
if isinstance(filter_val, str):
|
|
1168
|
+
# Cut after substring
|
|
1169
|
+
idx = result.find(filter_val)
|
|
1170
|
+
result = result[idx + len(filter_val):] if idx >= 0 else result
|
|
1171
|
+
else:
|
|
1172
|
+
# Cut after integer index
|
|
1173
|
+
idx = int(filter_val)
|
|
1174
|
+
result = result[idx:] if 0 <= idx <= len(result) else result
|
|
1154
1175
|
elif isinstance(result, list):
|
|
1155
|
-
|
|
1176
|
+
def cut_after_item(item):
|
|
1177
|
+
if not isinstance(item, str):
|
|
1178
|
+
return item
|
|
1179
|
+
if isinstance(filter_val, str):
|
|
1180
|
+
idx = item.find(filter_val)
|
|
1181
|
+
return item[idx + len(filter_val):] if idx >= 0 else item
|
|
1182
|
+
return item[int(filter_val):]
|
|
1183
|
+
result = [cut_after_item(item) for item in result]
|
|
1156
1184
|
elif helper == 'slice':
|
|
1157
1185
|
# Slice string with start:end format (e.g., "2:5")
|
|
1158
1186
|
if isinstance(result, str) and isinstance(filter_val, str) and ':' in filter_val:
|
|
@@ -1653,9 +1681,17 @@ class CSSLRuntime:
|
|
|
1653
1681
|
return None
|
|
1654
1682
|
|
|
1655
1683
|
if node.type == 'identifier':
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1684
|
+
name = node.value
|
|
1685
|
+
value = self.scope.get(name)
|
|
1686
|
+
# Fallback to global scope
|
|
1687
|
+
if value is None:
|
|
1688
|
+
value = self.global_scope.get(name)
|
|
1689
|
+
# Fallback to promoted globals (from 'global' keyword)
|
|
1690
|
+
if value is None:
|
|
1691
|
+
value = self._promoted_globals.get(name)
|
|
1692
|
+
# Fallback to builtins
|
|
1693
|
+
if value is None and self.builtins.has_function(name):
|
|
1694
|
+
return self.builtins.get_function(name)
|
|
1659
1695
|
return value
|
|
1660
1696
|
|
|
1661
1697
|
if node.type == 'module_ref':
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "IncludeCPP"
|
|
7
|
-
version = "3.5.
|
|
7
|
+
version = "3.5.9"
|
|
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
|