IncludeCPP 3.7.22__tar.gz → 3.7.24__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 (59) hide show
  1. {includecpp-3.7.22 → includecpp-3.7.24}/IncludeCPP.egg-info/PKG-INFO +1 -1
  2. {includecpp-3.7.22 → includecpp-3.7.24}/PKG-INFO +1 -1
  3. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/__init__.py +1 -1
  4. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_parser.py +54 -22
  5. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_runtime.py +56 -2
  6. {includecpp-3.7.22 → includecpp-3.7.24}/pyproject.toml +1 -1
  7. {includecpp-3.7.22 → includecpp-3.7.24}/IncludeCPP.egg-info/SOURCES.txt +0 -0
  8. {includecpp-3.7.22 → includecpp-3.7.24}/IncludeCPP.egg-info/dependency_links.txt +0 -0
  9. {includecpp-3.7.22 → includecpp-3.7.24}/IncludeCPP.egg-info/entry_points.txt +0 -0
  10. {includecpp-3.7.22 → includecpp-3.7.24}/IncludeCPP.egg-info/requires.txt +0 -0
  11. {includecpp-3.7.22 → includecpp-3.7.24}/IncludeCPP.egg-info/top_level.txt +0 -0
  12. {includecpp-3.7.22 → includecpp-3.7.24}/LICENSE +0 -0
  13. {includecpp-3.7.22 → includecpp-3.7.24}/MANIFEST.in +0 -0
  14. {includecpp-3.7.22 → includecpp-3.7.24}/README.md +0 -0
  15. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/__init__.pyi +0 -0
  16. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/__main__.py +0 -0
  17. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/cli/__init__.py +0 -0
  18. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/cli/commands.py +0 -0
  19. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/cli/config_parser.py +0 -0
  20. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/__init__.py +0 -0
  21. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/ai_integration.py +0 -0
  22. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/build_manager.py +0 -0
  23. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cpp_api.py +0 -0
  24. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cpp_api.pyi +0 -0
  25. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cppy_converter.py +0 -0
  26. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/CSSL_DOCUMENTATION.md +0 -0
  27. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/__init__.py +0 -0
  28. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_builtins.py +0 -0
  29. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_builtins.pyi +0 -0
  30. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_events.py +0 -0
  31. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_modules.py +0 -0
  32. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_syntax.py +0 -0
  33. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl/cssl_types.py +0 -0
  34. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl_bridge.py +0 -0
  35. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/cssl_bridge.pyi +0 -0
  36. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/error_catalog.py +0 -0
  37. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/error_formatter.py +0 -0
  38. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/exceptions.py +0 -0
  39. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/path_discovery.py +0 -0
  40. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/project_ui.py +0 -0
  41. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/core/settings_ui.py +0 -0
  42. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/generator/__init__.py +0 -0
  43. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/generator/parser.cpp +0 -0
  44. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/generator/parser.h +0 -0
  45. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/generator/type_resolver.cpp +0 -0
  46. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/generator/type_resolver.h +0 -0
  47. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/py.typed +0 -0
  48. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/templates/cpp.proj.template +0 -0
  49. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/__init__.py +0 -0
  50. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/__init__.py +0 -0
  51. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/images/cssl.png +0 -0
  52. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/images/cssl_pl.png +0 -0
  53. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/language-configuration.json +0 -0
  54. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/package.json +0 -0
  55. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/snippets/cssl.snippets.json +0 -0
  56. {includecpp-3.7.22 → includecpp-3.7.24}/includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +0 -0
  57. {includecpp-3.7.22 → includecpp-3.7.24}/requirements.txt +0 -0
  58. {includecpp-3.7.22 → includecpp-3.7.24}/setup.cfg +0 -0
  59. {includecpp-3.7.22 → includecpp-3.7.24}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IncludeCPP
3
- Version: 3.7.22
3
+ Version: 3.7.24
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: 3.7.22
3
+ Version: 3.7.24
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
@@ -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__ = "3.7.22"
5
+ __version__ = "3.7.24"
6
6
  __all__ = ["CppApi", "CSSL"]
7
7
 
8
8
  # Module-level cache for C++ modules
@@ -951,6 +951,27 @@ class CSSLParser:
951
951
  self._expect(TokenType.BLOCK_END)
952
952
  return node
953
953
 
954
+ def _looks_like_namespace_call(self) -> bool:
955
+ """Check if current position looks like a namespace function call.
956
+
957
+ Pattern: keyword::identifier(...) like json::write(), string::cut()
958
+ This allows type keywords to be used as namespace prefixes for function calls.
959
+ """
960
+ if not self._check(TokenType.KEYWORD):
961
+ return False
962
+
963
+ # Save position
964
+ saved_pos = self.pos
965
+
966
+ self._advance() # Skip keyword
967
+
968
+ # Must be followed by ::
969
+ result = self._check(TokenType.DOUBLE_COLON)
970
+
971
+ # Restore position
972
+ self.pos = saved_pos
973
+ return result
974
+
954
975
  def _looks_like_typed_variable(self) -> bool:
955
976
  """Check if current position looks like a typed variable declaration:
956
977
  type_name varName; or type_name<T> varName; or type_name varName = value;
@@ -1452,7 +1473,8 @@ class CSSLParser:
1452
1473
  elif (self._check(TokenType.IDENTIFIER) or self._check(TokenType.AT) or
1453
1474
  self._check(TokenType.CAPTURED_REF) or self._check(TokenType.SHARED_REF) or
1454
1475
  self._check(TokenType.GLOBAL_REF) or self._check(TokenType.SELF_REF) or
1455
- (self._check(TokenType.KEYWORD) and self._current().value in ('this', 'new'))):
1476
+ (self._check(TokenType.KEYWORD) and self._current().value in ('this', 'new')) or
1477
+ self._looks_like_namespace_call()):
1456
1478
  return self._parse_expression_statement()
1457
1479
  else:
1458
1480
  self._advance()
@@ -1919,32 +1941,42 @@ class CSSLParser:
1919
1941
  self._expect(TokenType.BLOCK_END)
1920
1942
  return node
1921
1943
 
1922
- def _parse_injection_filter(self) -> Optional[dict]:
1923
- """Parse injection filter: [type::helper=value]"""
1924
- if not self._match(TokenType.BRACKET_START):
1944
+ def _parse_injection_filter(self) -> Optional[list]:
1945
+ """Parse injection filter(s): [type::helper=value] or [f1][f2][f3]...
1946
+
1947
+ Returns a list of filter dictionaries to support chained filters.
1948
+ """
1949
+ if not self._check(TokenType.BRACKET_START):
1925
1950
  return None
1926
1951
 
1927
- filter_info = {}
1928
- # Parse type::helper=value patterns
1929
- while not self._check(TokenType.BRACKET_END) and not self._is_at_end():
1930
- if self._check(TokenType.IDENTIFIER) or self._check(TokenType.KEYWORD):
1931
- filter_type = self._advance().value
1932
- if self._match(TokenType.DOUBLE_COLON):
1933
- helper = self._advance().value
1934
- if self._match(TokenType.EQUALS):
1935
- value = self._parse_expression()
1936
- filter_info[f'{filter_type}::{helper}'] = value
1952
+ filters = []
1953
+
1954
+ # Parse multiple consecutive filter brackets
1955
+ while self._match(TokenType.BRACKET_START):
1956
+ filter_info = {}
1957
+ # Parse type::helper=value patterns within this bracket
1958
+ while not self._check(TokenType.BRACKET_END) and not self._is_at_end():
1959
+ if self._check(TokenType.IDENTIFIER) or self._check(TokenType.KEYWORD):
1960
+ filter_type = self._advance().value
1961
+ if self._match(TokenType.DOUBLE_COLON):
1962
+ helper = self._advance().value
1963
+ if self._match(TokenType.EQUALS):
1964
+ value = self._parse_expression()
1965
+ filter_info[f'{filter_type}::{helper}'] = value
1966
+ else:
1967
+ filter_info[f'{filter_type}::{helper}'] = True
1937
1968
  else:
1938
- filter_info[f'{filter_type}::{helper}'] = True
1969
+ filter_info['type'] = filter_type
1970
+ elif self._check(TokenType.COMMA):
1971
+ self._advance()
1939
1972
  else:
1940
- filter_info['type'] = filter_type
1941
- elif self._check(TokenType.COMMA):
1942
- self._advance()
1943
- else:
1944
- break
1973
+ break
1945
1974
 
1946
- self._expect(TokenType.BRACKET_END)
1947
- return filter_info if filter_info else None
1975
+ self._expect(TokenType.BRACKET_END)
1976
+ if filter_info:
1977
+ filters.append(filter_info)
1978
+
1979
+ return filters if filters else None
1948
1980
 
1949
1981
  def _parse_expression_statement(self) -> Optional[ASTNode]:
1950
1982
  expr = self._parse_expression()
@@ -1331,8 +1331,11 @@ class CSSLRuntime:
1331
1331
 
1332
1332
  return command_name
1333
1333
 
1334
- def _apply_injection_filter(self, source: Any, filter_info: dict) -> Any:
1335
- """Apply injection filter to extract specific data from source.
1334
+ def _apply_injection_filter(self, source: Any, filter_info) -> Any:
1335
+ """Apply injection filter(s) to extract specific data from source.
1336
+
1337
+ Supports both single filter dict and list of filter dicts for chained filters.
1338
+ Example: [dynamic::content=10][dynamic::content=100] applies both filters.
1336
1339
 
1337
1340
  All BruteInjector Helpers:
1338
1341
  - string::where=VALUE - Filter strings containing VALUE
@@ -1359,6 +1362,21 @@ class CSSLRuntime:
1359
1362
  if not filter_info:
1360
1363
  return source
1361
1364
 
1365
+ # Handle list of filters (chained filters)
1366
+ if isinstance(filter_info, list):
1367
+ result = source
1368
+ for single_filter in filter_info:
1369
+ result = self._apply_single_filter(result, single_filter)
1370
+ return result
1371
+
1372
+ # Single filter (dict)
1373
+ return self._apply_single_filter(source, filter_info)
1374
+
1375
+ def _apply_single_filter(self, source: Any, filter_info: dict) -> Any:
1376
+ """Apply a single injection filter to extract specific data from source."""
1377
+ if not filter_info:
1378
+ return source
1379
+
1362
1380
  result = source
1363
1381
 
1364
1382
  for filter_key, filter_value in filter_info.items():
@@ -2004,6 +2022,42 @@ class CSSLRuntime:
2004
2022
  self.global_scope.set(f'${name}', SharedObjectProxy(name, final_value))
2005
2023
  elif target.type == 'member_access':
2006
2024
  self._set_member(target, final_value)
2025
+ elif target.type == 'typed_declaration':
2026
+ # Handle typed target: source ==> datastruct<dynamic> Output
2027
+ var_name = target.value.get('name')
2028
+ type_name = target.value.get('type_name')
2029
+ element_type = target.value.get('element_type', 'dynamic')
2030
+
2031
+ # Create appropriate container with final_value
2032
+ from .cssl_types import (create_datastruct, create_vector, create_array,
2033
+ create_stack, create_list, create_dictionary, create_map)
2034
+
2035
+ container = None
2036
+ if type_name == 'datastruct':
2037
+ container = create_datastruct(element_type)
2038
+ elif type_name == 'vector':
2039
+ container = create_vector(element_type)
2040
+ elif type_name == 'array':
2041
+ container = create_array(element_type)
2042
+ elif type_name == 'stack':
2043
+ container = create_stack(element_type)
2044
+ elif type_name == 'list':
2045
+ container = create_list(element_type)
2046
+ elif type_name == 'dictionary':
2047
+ container = create_dictionary()
2048
+ elif type_name == 'map':
2049
+ container = create_map()
2050
+
2051
+ if container is not None:
2052
+ # Add final_value to container
2053
+ if isinstance(final_value, (list, tuple)):
2054
+ container.extend(final_value)
2055
+ elif final_value is not None:
2056
+ container.append(final_value)
2057
+ self.scope.set(var_name, container)
2058
+ else:
2059
+ # Unknown type, just set the value directly
2060
+ self.scope.set(var_name, final_value)
2007
2061
 
2008
2062
  return final_value
2009
2063
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "IncludeCPP"
7
- version = "3.7.22"
7
+ version = "3.7.24"
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