IncludeCPP 4.5.2__py3-none-any.whl → 4.9.3__py3-none-any.whl
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/CHANGELOG.md +241 -0
- includecpp/__init__.py +89 -3
- includecpp/__init__.pyi +2 -1
- includecpp/cli/commands.py +1747 -266
- includecpp/cli/config_parser.py +1 -1
- includecpp/core/build_manager.py +64 -13
- includecpp/core/cpp_api_extensions.pyi +43 -270
- includecpp/core/cssl/CSSL_DOCUMENTATION.md +1799 -1445
- includecpp/core/cssl/cpp/build/api.pyd +0 -0
- includecpp/core/cssl/cpp/build/api.pyi +274 -0
- includecpp/core/cssl/cpp/build/cssl_core.pyi +0 -99
- includecpp/core/cssl/cpp/cssl_core.cp +2 -23
- includecpp/core/cssl/cssl_builtins.py +2116 -171
- includecpp/core/cssl/cssl_builtins.pyi +1324 -104
- includecpp/core/cssl/cssl_compiler.py +4 -1
- includecpp/core/cssl/cssl_modules.py +605 -6
- includecpp/core/cssl/cssl_optimizer.py +12 -1
- includecpp/core/cssl/cssl_parser.py +1048 -52
- includecpp/core/cssl/cssl_runtime.py +2041 -131
- includecpp/core/cssl/cssl_syntax.py +405 -277
- includecpp/core/cssl/cssl_types.py +5891 -1655
- includecpp/core/cssl_bridge.py +429 -3
- includecpp/core/error_catalog.py +54 -10
- includecpp/core/homeserver.py +1037 -0
- includecpp/generator/parser.cpp +203 -39
- includecpp/generator/parser.h +15 -1
- includecpp/templates/cpp.proj.template +1 -1
- includecpp/vscode/cssl/snippets/cssl.snippets.json +163 -0
- includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +87 -12
- {includecpp-4.5.2.dist-info → includecpp-4.9.3.dist-info}/METADATA +81 -10
- {includecpp-4.5.2.dist-info → includecpp-4.9.3.dist-info}/RECORD +35 -33
- {includecpp-4.5.2.dist-info → includecpp-4.9.3.dist-info}/WHEEL +1 -1
- {includecpp-4.5.2.dist-info → includecpp-4.9.3.dist-info}/entry_points.txt +0 -0
- {includecpp-4.5.2.dist-info → includecpp-4.9.3.dist-info}/licenses/LICENSE +0 -0
- {includecpp-4.5.2.dist-info → includecpp-4.9.3.dist-info}/top_level.txt +0 -0
|
@@ -88,6 +88,8 @@ class ComplexityAnalyzer:
|
|
|
88
88
|
RECURSION_PATTERN = r'(\w+)\s*\([^)]*\)[^{]*\{[^}]*\1\s*\('
|
|
89
89
|
# v4.6.0: Native keyword forces C++ execution
|
|
90
90
|
NATIVE_PATTERN = r'\bnative\b'
|
|
91
|
+
# v4.6.5: Unative keyword forces Python execution (opposite of native)
|
|
92
|
+
UNATIVE_PATTERN = r'\bunative\b'
|
|
91
93
|
|
|
92
94
|
def __init__(self):
|
|
93
95
|
self._pattern_cache: Dict[str, re.Pattern] = {}
|
|
@@ -125,6 +127,9 @@ class ComplexityAnalyzer:
|
|
|
125
127
|
# Check for native keyword (forces C++ execution)
|
|
126
128
|
score.force_native = bool(self._get_pattern(self.NATIVE_PATTERN).search(source))
|
|
127
129
|
|
|
130
|
+
# Check for unative keyword (forces Python execution - opposite of native)
|
|
131
|
+
score.force_python = bool(self._get_pattern(self.UNATIVE_PATTERN).search(source))
|
|
132
|
+
|
|
128
133
|
# Calculate total score
|
|
129
134
|
score.calculate()
|
|
130
135
|
|
|
@@ -142,6 +147,7 @@ class ComplexityScore:
|
|
|
142
147
|
has_datastruct: bool = False
|
|
143
148
|
has_recursion: bool = False
|
|
144
149
|
force_native: bool = False # Force C++ execution (native keyword)
|
|
150
|
+
force_python: bool = False # Force Python execution (unative keyword) - v4.6.5
|
|
145
151
|
total_score: int = 0
|
|
146
152
|
|
|
147
153
|
def calculate(self) -> None:
|
|
@@ -576,9 +582,14 @@ class OptimizedRuntime:
|
|
|
576
582
|
|
|
577
583
|
# Check for 'native' keyword - forces C++ execution
|
|
578
584
|
force_native = ctx.complexity.force_native if ctx.complexity else False
|
|
585
|
+
# Check for 'unative' keyword - forces Python execution (opposite of native)
|
|
586
|
+
force_python = ctx.complexity.force_python if ctx.complexity else False
|
|
579
587
|
|
|
580
588
|
# Determine execution engine
|
|
581
|
-
if
|
|
589
|
+
if force_python:
|
|
590
|
+
# 'unative' keyword forces Python execution (no C++ even if available)
|
|
591
|
+
engine = "python"
|
|
592
|
+
elif force_native and self._cpp_available:
|
|
582
593
|
# 'native' keyword forces C++ execution (no fallback)
|
|
583
594
|
engine = "cpp"
|
|
584
595
|
elif service_engine is not None:
|