IncludeCPP 4.6.0__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.
Files changed (35) hide show
  1. includecpp/CHANGELOG.md +241 -0
  2. includecpp/__init__.py +89 -3
  3. includecpp/__init__.pyi +2 -1
  4. includecpp/cli/commands.py +1747 -266
  5. includecpp/cli/config_parser.py +1 -1
  6. includecpp/core/build_manager.py +64 -13
  7. includecpp/core/cpp_api_extensions.pyi +43 -270
  8. includecpp/core/cssl/CSSL_DOCUMENTATION.md +1799 -1445
  9. includecpp/core/cssl/cpp/build/api.pyd +0 -0
  10. includecpp/core/cssl/cpp/build/api.pyi +274 -0
  11. includecpp/core/cssl/cpp/build/cssl_core.pyi +0 -99
  12. includecpp/core/cssl/cpp/cssl_core.cp +2 -23
  13. includecpp/core/cssl/cssl_builtins.py +2116 -171
  14. includecpp/core/cssl/cssl_builtins.pyi +1324 -104
  15. includecpp/core/cssl/cssl_compiler.py +4 -1
  16. includecpp/core/cssl/cssl_modules.py +605 -6
  17. includecpp/core/cssl/cssl_optimizer.py +12 -1
  18. includecpp/core/cssl/cssl_parser.py +1048 -52
  19. includecpp/core/cssl/cssl_runtime.py +2041 -131
  20. includecpp/core/cssl/cssl_syntax.py +405 -277
  21. includecpp/core/cssl/cssl_types.py +5891 -1655
  22. includecpp/core/cssl_bridge.py +427 -4
  23. includecpp/core/error_catalog.py +54 -10
  24. includecpp/core/homeserver.py +1037 -0
  25. includecpp/generator/parser.cpp +203 -39
  26. includecpp/generator/parser.h +15 -1
  27. includecpp/templates/cpp.proj.template +1 -1
  28. includecpp/vscode/cssl/snippets/cssl.snippets.json +163 -0
  29. includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +87 -12
  30. {includecpp-4.6.0.dist-info → includecpp-4.9.3.dist-info}/METADATA +81 -10
  31. {includecpp-4.6.0.dist-info → includecpp-4.9.3.dist-info}/RECORD +35 -33
  32. {includecpp-4.6.0.dist-info → includecpp-4.9.3.dist-info}/WHEEL +1 -1
  33. {includecpp-4.6.0.dist-info → includecpp-4.9.3.dist-info}/entry_points.txt +0 -0
  34. {includecpp-4.6.0.dist-info → includecpp-4.9.3.dist-info}/licenses/LICENSE +0 -0
  35. {includecpp-4.6.0.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 force_native and self._cpp_available:
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: