IncludeCPP 4.2.2__tar.gz → 4.2.5__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 (67) hide show
  1. {includecpp-4.2.2 → includecpp-4.2.5}/IncludeCPP.egg-info/PKG-INFO +1 -1
  2. {includecpp-4.2.2 → includecpp-4.2.5}/PKG-INFO +1 -1
  3. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/CHANGELOG.md +56 -3
  4. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/DOCUMENTATION.md +51 -0
  5. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/__init__.py +1 -1
  6. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/cli/commands.py +2 -2
  7. includecpp-4.2.5/includecpp/core/cssl/CSSL_DOCUMENTATION.md +1720 -0
  8. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_parser.py +198 -13
  9. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_runtime.py +230 -11
  10. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +2 -2
  11. {includecpp-4.2.2 → includecpp-4.2.5}/pyproject.toml +1 -1
  12. includecpp-4.2.2/includecpp/core/cssl/CSSL_DOCUMENTATION.md +0 -1682
  13. {includecpp-4.2.2 → includecpp-4.2.5}/IncludeCPP.egg-info/SOURCES.txt +0 -0
  14. {includecpp-4.2.2 → includecpp-4.2.5}/IncludeCPP.egg-info/dependency_links.txt +0 -0
  15. {includecpp-4.2.2 → includecpp-4.2.5}/IncludeCPP.egg-info/entry_points.txt +0 -0
  16. {includecpp-4.2.2 → includecpp-4.2.5}/IncludeCPP.egg-info/requires.txt +0 -0
  17. {includecpp-4.2.2 → includecpp-4.2.5}/IncludeCPP.egg-info/top_level.txt +0 -0
  18. {includecpp-4.2.2 → includecpp-4.2.5}/LICENSE +0 -0
  19. {includecpp-4.2.2 → includecpp-4.2.5}/MANIFEST.in +0 -0
  20. {includecpp-4.2.2 → includecpp-4.2.5}/README.md +0 -0
  21. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/__init__.pyi +0 -0
  22. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/__main__.py +0 -0
  23. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/cli/__init__.py +0 -0
  24. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/cli/config_parser.py +0 -0
  25. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/__init__.py +0 -0
  26. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/ai_integration.py +0 -0
  27. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/build_manager.py +0 -0
  28. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cpp_api.py +0 -0
  29. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cpp_api.pyi +0 -0
  30. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cpp_api_extensions.pyi +0 -0
  31. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cppy_converter.py +0 -0
  32. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/CSSL_DOCUMENTATION_NEW.md +0 -0
  33. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/__init__.py +0 -0
  34. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_builtins.py +0 -0
  35. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_builtins.pyi +0 -0
  36. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_events.py +0 -0
  37. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_languages.py +0 -0
  38. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_modules.py +0 -0
  39. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_syntax.py +0 -0
  40. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl/cssl_types.py +0 -0
  41. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl_bridge.py +0 -0
  42. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/cssl_bridge.pyi +0 -0
  43. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/error_catalog.py +0 -0
  44. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/error_formatter.py +0 -0
  45. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/exceptions.py +0 -0
  46. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/path_discovery.py +0 -0
  47. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/project_ui.py +0 -0
  48. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/core/settings_ui.py +0 -0
  49. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/generator/__init__.py +0 -0
  50. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/generator/parser.cpp +0 -0
  51. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/generator/parser.h +0 -0
  52. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/generator/type_resolver.cpp +0 -0
  53. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/generator/type_resolver.h +0 -0
  54. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/py.typed +0 -0
  55. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/templates/cpp.proj.template +0 -0
  56. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/__init__.py +0 -0
  57. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/__init__.py +0 -0
  58. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/extension.js +0 -0
  59. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/images/cssl.png +0 -0
  60. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/images/cssl_pl.png +0 -0
  61. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/language-configuration.json +0 -0
  62. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/package.json +0 -0
  63. {includecpp-4.2.2 → includecpp-4.2.5}/includecpp/vscode/cssl/snippets/cssl.snippets.json +0 -0
  64. {includecpp-4.2.2 → includecpp-4.2.5}/requirements.txt +0 -0
  65. {includecpp-4.2.2 → includecpp-4.2.5}/setup.cfg +0 -0
  66. {includecpp-4.2.2 → includecpp-4.2.5}/setup.py +0 -0
  67. {includecpp-4.2.2 → includecpp-4.2.5}/tests/test_multilang.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 4.2.2
3
+ Version: 4.2.5
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: 4.2.2
3
+ Version: 4.2.5
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,59 @@
1
1
  # IncludeCPP Changelog
2
2
 
3
- ## v4.2.2 (2025-01-08)
3
+ ## v4.2.5 (2026-01-08)
4
+
5
+ ### New Features
6
+ - **Added `embedded` keyword for immediate `&target` replacement**
7
+ - `embedded func() &exit { }` - replaces `exit` immediately at registration
8
+ - `embedded class MyClass &$Target { }` - replaces `$Target` immediately at registration
9
+ - Regular `define func() &target { }` now defers replacement until function is called
10
+ - Regular `class MyClass &$Target { }` now defers replacement until class is instantiated
11
+ - `: overwrites` behavior remains unchanged (always immediate)
12
+ - Added VSCode syntax highlighting for `embedded` keyword
13
+ - **Added `switch` for open parameters** - pattern matching on provided named parameters
14
+ - `case name:` - executes if parameter exists
15
+ - `case name & age:` - executes if both parameters exist (AND)
16
+ - `case name & not age:` - executes if name exists AND age doesn't
17
+ - `except name:` - executes if parameter does NOT exist
18
+ - `default:` - executes if no case matched
19
+ - `always:` - executes after any matching case
20
+ - `finally:` - executes regardless of match (cleanup)
21
+
22
+ ### Bug Fixes
23
+ - **Fixed `OpenFind<type, "name">` returning function reference instead of value**
24
+ - `OpenFind<dynamic, "task">` now works without `()` parentheses
25
+ - Both `OpenFind<type, "name">` and `OpenFind<type>(index)` work correctly
26
+
27
+ ### Behavior Changes
28
+ - **`&target` replacement timing**:
29
+ - `define func() &exit { }` - deferred (only when `func()` is called)
30
+ - `embedded func() &exit { }` - immediate (at registration)
31
+ - `class MyClass &$Game { }` - deferred (only when `new MyClass()` is called)
32
+ - `embedded class MyClass &$Game { }` - immediate (at registration)
33
+
34
+ ---
35
+
36
+ ## v4.2.4 (2026-01-08)
37
+
38
+ ### Bug Fixes
39
+ - **Fixed `%name` priority for `&function` overrides** - `%exit()` now correctly calls the original builtin
40
+ - `define _exit() &exit { %exit(); }` no longer causes infinite recursion
41
+ - Original functions are stored BEFORE replacement for proper `%` capture
42
+ - `_original_functions` is checked FIRST when resolving `%name` references
43
+
44
+ ---
45
+
46
+ ## v4.2.3 (2026-01-08)
47
+
48
+ ### Bug Fixes
49
+ - Removed pagination from `includecpp cssl doc` - documentation now outputs completely without requiring Enter
50
+ - **Fixed `&builtin` function override** - `define MyFunc() &exit { ... }` now properly replaces builtin functions
51
+ - `&exit`, `&printl`, `&input`, etc. now correctly override the builtin implementations
52
+ - Builtins in scope were incorrectly treated as CSSLClass instances, preventing override
53
+
54
+ ---
55
+
56
+ ## v4.2.2 (2026-01-08)
4
57
 
5
58
  ### Bug Fixes
6
59
  - **Fixed bidirectional `lang$Instance` mutations** - Cross-language instance access now correctly modifies shared objects
@@ -11,7 +64,7 @@
11
64
 
12
65
  ---
13
66
 
14
- ## v4.2.1 (2025-01-08)
67
+ ## v4.2.1 (2026-01-08)
15
68
 
16
69
  ### CLI Improvements
17
70
  - `--doc` and `--doc "term"` now load from local DOCUMENTATION.md
@@ -25,7 +78,7 @@
25
78
 
26
79
  ---
27
80
 
28
- ## v4.2.0 (2025-01-08)
81
+ ## v4.2.0 (2026-01-08)
29
82
 
30
83
  ### Multi-Language Support
31
84
  - Added `libinclude("language")` for loading language support modules
@@ -458,6 +458,57 @@ myFunc() +<<== {
458
458
  };
459
459
  ```
460
460
 
461
+ ### Function/Class Replacement (`&target`)
462
+
463
+ Replace existing functions or classes with new implementations:
464
+
465
+ ```cssl
466
+ // Define original function
467
+ define original() {
468
+ return "original";
469
+ }
470
+
471
+ // Regular define: replacement happens when myFunc() is CALLED
472
+ define myFunc() &original {
473
+ return "replaced";
474
+ }
475
+
476
+ original(); // Still returns "original"
477
+ myFunc(); // Triggers replacement
478
+ original(); // Now returns "replaced"
479
+
480
+ // 'embedded' keyword: replacement happens IMMEDIATELY
481
+ embedded immediateReplace() &original {
482
+ return "immediately replaced";
483
+ }
484
+ // original is already replaced after this line
485
+ ```
486
+
487
+ ### Embedded Classes
488
+
489
+ ```cssl
490
+ class Game {
491
+ int score;
492
+ }
493
+
494
+ // Deferred: replacement when instantiated
495
+ class BetterGame &Game {
496
+ int bonus;
497
+ }
498
+
499
+ // Immediate: replacement at registration
500
+ embedded class SuperGame &$SharedGame {
501
+ int multiplier;
502
+ }
503
+ ```
504
+
505
+ | Syntax | Replacement Timing |
506
+ |--------|-------------------|
507
+ | `define func() &target { }` | Deferred (when called) |
508
+ | `embedded func() &target { }` | Immediate (at registration) |
509
+ | `class X &Target { }` | Deferred (when instantiated) |
510
+ | `embedded class X &Target { }` | Immediate (at registration) |
511
+
461
512
  ---
462
513
 
463
514
  ## CSSL Modules
@@ -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__ = "4.2.2"
5
+ __version__ = "4.2.5"
6
6
  __all__ = ["CppApi", "CSSL"]
7
7
 
8
8
  # Module-level cache for C++ modules
@@ -7888,11 +7888,11 @@ def cssl_doc(search, list_sections):
7888
7888
  click.echo()
7889
7889
  click.echo("Or use: includecpp cssl doc --list")
7890
7890
  else:
7891
- # Full documentation mode
7891
+ # Full documentation mode - output everything at once (no pager)
7892
7892
  # Replace Unicode characters that may not be supported on all terminals
7893
7893
  safe_content = content.replace('✓', '[OK]').replace('✗', '[X]').replace('→', '->').replace('←', '<-').replace('•', '*').replace('─', '-').replace('│', '|').replace('└', '+').replace('├', '+').replace('▸', '>').replace('▾', 'v')
7894
7894
  try:
7895
- click.echo_via_pager(safe_content)
7895
+ click.echo(safe_content)
7896
7896
  except UnicodeEncodeError:
7897
7897
  # Fallback: encode with errors='replace'
7898
7898
  click.echo(safe_content.encode('ascii', errors='replace').decode('ascii'))