IncludeCPP 4.2.2__py3-none-any.whl → 4.5.2__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 (33) hide show
  1. includecpp/CHANGELOG.md +104 -115
  2. includecpp/DOCUMENTATION.md +208 -355
  3. includecpp/__init__.py +1 -1
  4. includecpp/__init__.pyi +1 -4
  5. includecpp/cli/commands.py +1220 -27
  6. includecpp/core/cpp_api_extensions.pyi +204 -200
  7. includecpp/core/cssl/CSSL_DOCUMENTATION.md +1505 -1467
  8. includecpp/core/cssl/__init__.py +317 -0
  9. includecpp/core/cssl/cpp/build/api.pyd +0 -0
  10. includecpp/core/cssl/cpp/build/cssl_core.pyi +323 -0
  11. includecpp/core/cssl/cpp/build/libgcc_s_seh-1.dll +0 -0
  12. includecpp/core/cssl/cpp/build/libstdc++-6.dll +0 -0
  13. includecpp/core/cssl/cpp/build/libwinpthread-1.dll +0 -0
  14. includecpp/core/cssl/cpp/cssl_core.cp +108 -0
  15. includecpp/core/cssl/cpp/cssl_lexer.hpp +280 -0
  16. includecpp/core/cssl/cssl_builtins.py +245 -20
  17. includecpp/core/cssl/cssl_compiler.py +448 -0
  18. includecpp/core/cssl/cssl_optimizer.py +833 -0
  19. includecpp/core/cssl/cssl_parser.py +945 -40
  20. includecpp/core/cssl/cssl_runtime.py +751 -38
  21. includecpp/core/cssl/cssl_syntax.py +17 -0
  22. includecpp/core/cssl/cssl_types.py +321 -0
  23. includecpp/core/cssl_bridge.py +36 -2
  24. includecpp/generator/parser.cpp +38 -14
  25. includecpp/vscode/cssl/package.json +15 -0
  26. includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +134 -2
  27. includecpp-4.5.2.dist-info/METADATA +277 -0
  28. {includecpp-4.2.2.dist-info → includecpp-4.5.2.dist-info}/RECORD +32 -23
  29. includecpp-4.2.2.dist-info/METADATA +0 -1008
  30. {includecpp-4.2.2.dist-info → includecpp-4.5.2.dist-info}/WHEEL +0 -0
  31. {includecpp-4.2.2.dist-info → includecpp-4.5.2.dist-info}/entry_points.txt +0 -0
  32. {includecpp-4.2.2.dist-info → includecpp-4.5.2.dist-info}/licenses/LICENSE +0 -0
  33. {includecpp-4.2.2.dist-info → includecpp-4.5.2.dist-info}/top_level.txt +0 -0
includecpp/CHANGELOG.md CHANGED
@@ -1,112 +1,127 @@
1
1
  # IncludeCPP Changelog
2
2
 
3
- ## v4.2.2 (2025-01-08)
3
+ ## v4.3.2 (2026-01-08)
4
+
5
+ ### New Features
6
+ - `embedded` keyword now supports enums: `embedded NewName &OldEnum { ... }`
7
+ - Enum values can be any expression (strings, numbers, etc.)
8
+ - `bytearrayed` list pattern matching: `case { ["read", "write"] }` matches list return values
9
+ - `bytearrayed` function references with parameters: `&checkAccess(10);`
10
+ - `bytearrayed` simulation mode: analyzes return values without executing function body (no side effects)
11
+ - `bytearrayed` now correctly handles conditional return paths (if/else)
4
12
 
5
13
  ### Bug Fixes
6
- - **Fixed bidirectional `lang$Instance` mutations** - Cross-language instance access now correctly modifies shared objects
7
- - `js$GameData.score = 1337` now properly updates the original instance
8
- - All mutations via `lang$Instance.member = value` are now applied bidirectionally
9
- - Fixed `LANG_INSTANCE_REF` token not being recognized in `parse_program()`, `_parse_statement()`, and `_parse_action_block()`
10
- - Parser now correctly handles `lang$Instance` as a valid expression start token
14
+ - Fixed `global` variables in namespaced payloads not being accessible via `@`
15
+ - Fixed `@module.function()` calls on `include()` results (ServiceDefinition support)
16
+ - Fixed `bytearrayed` case body return statements (CSSLReturn exception handling)
17
+ - Fixed embedded open define syntax: both `open embedded define` and `embedded open define` now work
18
+ - Fixed `switch(variable)` with param conditions: auto-detects param_switch when case uses `&` or `not`
19
+ - Fixed `bytearrayed` pattern parsing for boolean values (`true`/`false`)
20
+ - Enhanced param_switch conditions: `a & b`, `a & not b`, `a || b`, `a & !b` all supported
21
+ - param_switch now checks both kwargs AND OpenFind variables (positional args work with `case text:`)
11
22
 
12
23
  ---
13
24
 
14
- ## v4.2.1 (2025-01-08)
25
+ ## v4.3.0 (2026-01-08)
15
26
 
16
- ### CLI Improvements
17
- - `--doc` and `--doc "term"` now load from local DOCUMENTATION.md
18
- - `--changelog` now loads from local CHANGELOG.md
19
- - Added `--changelog --N` (e.g., `--changelog --5`) for showing N releases
20
- - Added `--changelog --all` for showing all releases
27
+ ### New Features
28
+ - Payload namespace support: `payload("mylib", "libname")` loads definitions into `libname::`
29
+ - Auto-extension for payloads: `payload("engine")` finds `engine.cssl-pl`
30
+ - Namespaced class instantiation: `new Engine::GameEngine()`
21
31
 
22
- ### Documentation
23
- - Added comprehensive DOCUMENTATION.md for CLI reference
24
- - Added CHANGELOG.md for version history
32
+ ### Bug Fixes
33
+ - Fixed try/catch parsing (catch was interpreted as function call)
34
+ - Added finally block support for try/catch
35
+ - Division by zero now throws error instead of returning 0
36
+ - Modulo by zero now throws error
37
+ - List index out of bounds now throws error with helpful message
38
+ - Dict key not found now throws error
39
+ - try/catch now catches Python exceptions
40
+ - Fixed `embedded &$PyObject::method` replacement (this-> now works)
25
41
 
26
42
  ---
27
43
 
28
- ## v4.2.0 (2025-01-08)
44
+ ## v4.2.5 (2026-01-08)
29
45
 
30
- ### Multi-Language Support
31
- - Added `libinclude("language")` for loading language support modules
32
- - Added `supports <lang>` keyword for writing in other language syntax
33
- - Added cross-language instance sharing with `lang$InstanceName` syntax
34
- - Added language transformers for Python, JavaScript, Java, C#, C++
35
- - Added default parameter values in CSSL functions
46
+ ### New Features
47
+ - Added `embedded` keyword for immediate function/class replacement
48
+ - Added `switch` for open parameters with pattern matching
36
49
 
37
- ### SDK Packages
38
- - Added C++ SDK (`sdk/cpp/includecpp.h`)
39
- - Added Java SDK (`sdk/java/src/com/includecpp/CSSL.java`)
40
- - Added C# SDK (`sdk/csharp/IncludeCPP.cs`)
41
- - Added JavaScript SDK (`sdk/javascript/includecpp.js`)
42
- - Added `includecpp cssl sdk <lang>` command to generate SDKs
50
+ ### Bug Fixes
51
+ - Fixed `OpenFind<type, "name">` returning function reference instead of value
43
52
 
44
- ### CLI Improvements
45
- - Added `--doc "searchterm"` for documentation search
46
- - Added `--changelog --all`, `--changelog --N` for changelog viewing
47
- - Improved error messages with line context
53
+ ---
54
+
55
+ ## v4.2.4 (2026-01-08)
48
56
 
49
57
  ### Bug Fixes
50
- - Fixed compound assignment operators in Python transformer (-=, +=, *=, /=)
51
- - Fixed type annotation stripping in `supports python` blocks
52
- - Fixed self parameter handling in Python method transformation
58
+ - Fixed `%name` priority for `&function` overrides
53
59
 
54
60
  ---
55
61
 
56
- ## v4.1.0 (2024-12-15)
62
+ ## v4.2.3 (2026-01-08)
57
63
 
58
- ### CodeInfusion System
59
- - Added `<<==` operator for code injection into functions
60
- - Added `+<<==` for appending code without replacing
61
- - Added method appending with `&Class::method` syntax
62
- - Added `++` append mode for function definitions
64
+ ### Bug Fixes
65
+ - Removed pagination from CLI documentation
66
+ - Fixed `&builtin` function override
63
67
 
64
- ### Class Improvements
65
- - Added `overwrites` keyword for method replacement
66
- - Added `extends Parent::method` for method-level inheritance
67
- - Added `super()` and `super::method()` calls
68
- - Added shuffled returns with `shuffled<T>` type
68
+ ---
69
69
 
70
- ### New Containers
71
- - Added `combo<T>` for filter/search operations
72
- - Added `iterator<T>` for programmable iterators
73
- - Added `datastruct<T>` universal container
70
+ ## v4.2.2 (2026-01-08)
74
71
 
75
- ### Python Interop
76
- - Added `python::pythonize()` for returning CSSL classes to Python
77
- - Added `python::wrap()` and `python::export()` aliases
78
- - Added universal instances with `instance<"name">`
72
+ ### Bug Fixes
73
+ - Fixed bidirectional `lang$Instance` mutations
79
74
 
80
75
  ---
81
76
 
82
- ## v4.0.3 (2024-11-20)
77
+ ## v4.2.1 (2026-01-08)
78
+
79
+ ### CLI Improvements
80
+ - `--doc` and `--changelog` now load from local files
81
+ - Added `--changelog --N` and `--changelog --all` options
82
+
83
+ ---
83
84
 
84
- ### Universal Instances
85
- - Added `instance<"name">` for cross-runtime shared containers
86
- - Added `cssl.getInstance("name")` Python API
87
- - Added `cssl.createInstance("name")` Python API
88
- - Added `cssl.deleteInstance("name")` Python API
89
- - Added method injection into instances with `+<<==`
85
+ ## v4.2.0 (2026-01-08)
90
86
 
91
- ### Module System
92
- - Added `CSSL.makemodule()` for creating callable modules
93
- - Added `CSSL.makepayload()` for payload file registration
94
- - Added payload binding with `bind=` parameter
87
+ ### New Features
88
+ - Multi-language support with `libinclude()` and `supports` keyword
89
+ - Cross-language instance sharing with `lang$InstanceName` syntax
90
+ - Language transformers for Python, JavaScript, Java, C#, C++
91
+ - SDK packages for C++, Java, C#, JavaScript
92
+ - Default parameter values in CSSL functions
93
+
94
+ ### CLI
95
+ - Added `includecpp cssl sdk <lang>` command
96
+ - Added `--doc "searchterm"` for documentation search
95
97
 
96
98
  ---
97
99
 
98
- ## v4.0.2 (2024-11-01)
100
+ ## v4.1.0 (2024-12-15)
101
+
102
+ ### New Features
103
+ - CodeInfusion system with `<<==` and `+<<==` operators
104
+ - Class `overwrites` keyword
105
+ - `super()` and `super::method()` calls
106
+ - New containers: `combo<T>`, `iterator<T>`, `datastruct<T>`
107
+ - `python::pythonize()` for returning CSSL classes to Python
108
+
109
+ ---
110
+
111
+ ## v4.0.3 (2024-11-20)
112
+
113
+ ### New Features
114
+ - Universal instances with `instance<"name">`
115
+ - Python API: `getInstance()`, `createInstance()`, `deleteInstance()`
116
+ - Method injection with `+<<==`
117
+
118
+ ---
99
119
 
100
- ### Simplified API
101
- - Added `CSSL.run()` as main entry point
102
- - Added `CSSL.module()` for creating modules from strings
103
- - Added `CSSL.script()` for inline payload registration
104
- - Improved parameter handling with `parameter.get()` and `parameter.return()`
120
+ ## v4.0.2 (2024-11-01)
105
121
 
106
- ### Shared Objects
107
- - Added `cssl.share(obj, "name")` for Python object sharing
108
- - Added `$name` syntax for accessing shared objects
109
- - Changes in CSSL reflect back to Python objects
122
+ ### New Features
123
+ - Simplified API: `CSSL.run()`, `CSSL.module()`, `CSSL.script()`
124
+ - Shared objects with `cssl.share(obj, "name")` and `$name` syntax
110
125
 
111
126
  ---
112
127
 
@@ -114,62 +129,36 @@
114
129
 
115
130
  ### Major Release
116
131
  - Complete rewrite of CSSL parser and runtime
117
- - Added generic container types (`stack<T>`, `vector<T>`, `map<K,V>`)
118
- - Added class system with constructors and inheritance
119
- - Added BruteInjection operators (`<==`, `+<==`, `-<==`)
120
- - Added global variables with `@name` syntax
121
- - Added captured variables with `%name` syntax
122
-
123
- ### AI Integration
124
- - Added `includecpp ai` command group
125
- - Added AI-assisted code analysis
126
- - Added AI-powered optimization
127
- - Added `includecpp ai ask` for project questions
132
+ - Generic container types: `stack<T>`, `vector<T>`, `map<K,V>`
133
+ - Class system with constructors and inheritance
134
+ - BruteInjection operators: `<==`, `+<==`, `-<==`
135
+ - Global variables with `@name`, captured variables with `%name`
128
136
 
129
137
  ---
130
138
 
131
139
  ## v3.2.0 (2024-09-01)
132
140
 
133
- ### CPPY Conversion
134
- - Added `includecpp cppy convert` command
135
- - Added Python to C++ conversion
136
- - Added C++ to Python conversion
137
- - Added AI-assisted conversion with `--ai` flag
138
- - Added type mapping tables
139
-
140
- ### Build Improvements
141
- - Added `--fast` flag for incremental builds
142
- - Added object file caching
143
- - Added SHA256 hash checking for unchanged modules
144
- - Reduced rebuild time to ~0.4s when unchanged
141
+ ### New Features
142
+ - CPPY code conversion (`includecpp cppy convert`)
143
+ - AI-assisted conversion with `--ai` flag
144
+ - Fast incremental builds with `--fast` flag
145
145
 
146
146
  ---
147
147
 
148
148
  ## v3.1.0 (2024-08-01)
149
149
 
150
- ### CLI Enhancements
151
- - Added `includecpp auto` command
152
- - Added `includecpp fix` for code analysis
153
- - Added `--verbose` flag for detailed output
154
- - Added `-j` flag for parallel jobs
155
-
156
- ### Plugin Format
157
- - Added `DEPENDS()` for module dependencies
158
- - Added `TEMPLATE_FUNC()` for template instantiation
159
- - Added `METHOD_CONST()` for overloaded methods
150
+ ### New Features
151
+ - `includecpp auto` and `includecpp fix` commands
152
+ - `DEPENDS()` for module dependencies
153
+ - `TEMPLATE_FUNC()` for template instantiation
160
154
 
161
155
  ---
162
156
 
163
157
  ## v3.0.0 (2024-07-01)
164
158
 
165
- ### Initial CSSL
166
- - Added CSSL scripting language
167
- - Added basic data types and control flow
168
- - Added functions and basic classes
169
- - Added Python interop with shared objects
170
-
171
- ### Core Features
159
+ ### Initial Release
172
160
  - C++ to Python binding generation
161
+ - CSSL scripting language
173
162
  - Plugin file format (.cp)
174
163
  - CMake-based build system
175
164
  - Cross-platform support (Windows, Linux, Mac)