IncludeCPP 4.3.0__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.
- includecpp/CHANGELOG.md +22 -0
- includecpp/__init__.py +1 -1
- includecpp/__init__.pyi +1 -4
- includecpp/cli/commands.py +1218 -25
- includecpp/core/cpp_api_extensions.pyi +204 -200
- includecpp/core/cssl/__init__.py +317 -0
- includecpp/core/cssl/cpp/build/api.pyd +0 -0
- includecpp/core/cssl/cpp/build/cssl_core.pyi +323 -0
- includecpp/core/cssl/cpp/build/libgcc_s_seh-1.dll +0 -0
- includecpp/core/cssl/cpp/build/libstdc++-6.dll +0 -0
- includecpp/core/cssl/cpp/build/libwinpthread-1.dll +0 -0
- includecpp/core/cssl/cpp/cssl_core.cp +108 -0
- includecpp/core/cssl/cpp/cssl_lexer.hpp +280 -0
- includecpp/core/cssl/cssl_builtins.py +142 -27
- includecpp/core/cssl/cssl_compiler.py +448 -0
- includecpp/core/cssl/cssl_optimizer.py +833 -0
- includecpp/core/cssl/cssl_parser.py +433 -38
- includecpp/core/cssl/cssl_runtime.py +294 -15
- includecpp/core/cssl/cssl_syntax.py +17 -0
- includecpp/core/cssl/cssl_types.py +143 -11
- includecpp/core/cssl_bridge.py +36 -2
- includecpp/generator/parser.cpp +38 -14
- includecpp/vscode/cssl/package.json +15 -0
- includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json +96 -0
- {includecpp-4.3.0.dist-info → includecpp-4.5.2.dist-info}/METADATA +1 -1
- {includecpp-4.3.0.dist-info → includecpp-4.5.2.dist-info}/RECORD +30 -21
- {includecpp-4.3.0.dist-info → includecpp-4.5.2.dist-info}/WHEEL +0 -0
- {includecpp-4.3.0.dist-info → includecpp-4.5.2.dist-info}/entry_points.txt +0 -0
- {includecpp-4.3.0.dist-info → includecpp-4.5.2.dist-info}/licenses/LICENSE +0 -0
- {includecpp-4.3.0.dist-info → includecpp-4.5.2.dist-info}/top_level.txt +0 -0
|
@@ -1497,12 +1497,21 @@ class ByteArrayed:
|
|
|
1497
1497
|
|
|
1498
1498
|
return None
|
|
1499
1499
|
|
|
1500
|
-
def _probe_functions(self) -> List[Any]:
|
|
1501
|
-
"""
|
|
1500
|
+
def _probe_functions(self, simulate: bool = True) -> List[Any]:
|
|
1501
|
+
"""Probe referenced functions to get their return values.
|
|
1502
|
+
|
|
1503
|
+
v4.3.2: When simulate=True, analyzes function return statements without
|
|
1504
|
+
full execution. This is more precise for pattern matching.
|
|
1505
|
+
|
|
1506
|
+
Args:
|
|
1507
|
+
simulate: If True, analyze return values without executing.
|
|
1508
|
+
If False, execute functions to get actual return values.
|
|
1509
|
+
"""
|
|
1502
1510
|
values = []
|
|
1503
1511
|
for ref in self.func_refs:
|
|
1504
1512
|
func_name = ref['func_ref']
|
|
1505
1513
|
position = ref['position']
|
|
1514
|
+
func_args = ref.get('args', []) # v4.3.2: Support function arguments
|
|
1506
1515
|
|
|
1507
1516
|
# Look up the function in runtime scope
|
|
1508
1517
|
func = None
|
|
@@ -1513,26 +1522,133 @@ class ByteArrayed:
|
|
|
1513
1522
|
if func is None:
|
|
1514
1523
|
func = self._runtime.builtins.get_function(func_name)
|
|
1515
1524
|
|
|
1516
|
-
|
|
1525
|
+
result = None
|
|
1526
|
+
|
|
1517
1527
|
if func is not None:
|
|
1518
1528
|
try:
|
|
1519
|
-
if
|
|
1520
|
-
|
|
1529
|
+
# v4.3.2: Evaluate arguments if present
|
|
1530
|
+
evaluated_args = []
|
|
1531
|
+
for arg in func_args:
|
|
1532
|
+
if hasattr(arg, 'type'):
|
|
1533
|
+
evaluated_args.append(self._runtime._evaluate(arg))
|
|
1534
|
+
else:
|
|
1535
|
+
evaluated_args.append(arg)
|
|
1536
|
+
|
|
1537
|
+
if simulate and hasattr(func, 'type') and func.type == 'function':
|
|
1538
|
+
# v4.3.2: Simulate - analyze return statements without full execution
|
|
1539
|
+
result = self._simulate_function_return(func, evaluated_args)
|
|
1540
|
+
elif callable(func):
|
|
1541
|
+
result = func(*evaluated_args) if evaluated_args else func()
|
|
1521
1542
|
elif hasattr(func, 'type') and func.type == 'function':
|
|
1522
|
-
# CSSL function node
|
|
1523
|
-
result = self._runtime._call_function(func,
|
|
1543
|
+
# CSSL function node - execute with args
|
|
1544
|
+
result = self._runtime._call_function(func, evaluated_args)
|
|
1524
1545
|
else:
|
|
1525
1546
|
result = func
|
|
1526
1547
|
except Exception:
|
|
1527
1548
|
result = None
|
|
1528
|
-
else:
|
|
1529
|
-
result = None
|
|
1530
1549
|
|
|
1531
1550
|
values.append(result)
|
|
1532
1551
|
self._cached_values[position] = result
|
|
1533
1552
|
|
|
1534
1553
|
return values
|
|
1535
1554
|
|
|
1555
|
+
def _simulate_function_return(self, func_node, args: List[Any] = None) -> Any:
|
|
1556
|
+
"""Simulate a function and extract its return value without full execution.
|
|
1557
|
+
|
|
1558
|
+
v4.3.2: Analyzes the function's return statements and evaluates them
|
|
1559
|
+
in isolation to get precise return values for pattern matching.
|
|
1560
|
+
"""
|
|
1561
|
+
if not self._runtime or not func_node:
|
|
1562
|
+
return None
|
|
1563
|
+
|
|
1564
|
+
# Create a temporary scope with function parameters bound to args
|
|
1565
|
+
func_info = func_node.value
|
|
1566
|
+
params = func_info.get('params', [])
|
|
1567
|
+
args = args or []
|
|
1568
|
+
|
|
1569
|
+
# Bind parameters to arguments in a temporary scope
|
|
1570
|
+
old_scope = self._runtime.scope
|
|
1571
|
+
# v4.3.2: Create child scope manually (Scope is a dataclass)
|
|
1572
|
+
from includecpp.core.cssl.cssl_runtime import Scope
|
|
1573
|
+
self._runtime.scope = Scope(variables={}, parent=old_scope)
|
|
1574
|
+
|
|
1575
|
+
try:
|
|
1576
|
+
# Bind parameters
|
|
1577
|
+
for i, param in enumerate(params):
|
|
1578
|
+
if isinstance(param, dict):
|
|
1579
|
+
param_name = param.get('name')
|
|
1580
|
+
default_value = param.get('default')
|
|
1581
|
+
if i < len(args):
|
|
1582
|
+
self._runtime.scope.set(param_name, args[i])
|
|
1583
|
+
elif default_value is not None:
|
|
1584
|
+
val = self._runtime._evaluate(default_value) if hasattr(default_value, 'type') else default_value
|
|
1585
|
+
self._runtime.scope.set(param_name, val)
|
|
1586
|
+
else:
|
|
1587
|
+
if i < len(args):
|
|
1588
|
+
self._runtime.scope.set(param, args[i])
|
|
1589
|
+
|
|
1590
|
+
# Find and evaluate the first return statement
|
|
1591
|
+
for child in func_node.children:
|
|
1592
|
+
ret_val = self._extract_return_value(child)
|
|
1593
|
+
if ret_val is not None:
|
|
1594
|
+
return ret_val
|
|
1595
|
+
|
|
1596
|
+
return None
|
|
1597
|
+
finally:
|
|
1598
|
+
# Restore original scope
|
|
1599
|
+
self._runtime.scope = old_scope
|
|
1600
|
+
|
|
1601
|
+
def _extract_return_value(self, node) -> Any:
|
|
1602
|
+
"""Extract return value from a node, handling conditionals and blocks.
|
|
1603
|
+
|
|
1604
|
+
v4.3.2: Properly evaluates if/else conditions to find the correct return path.
|
|
1605
|
+
"""
|
|
1606
|
+
if not hasattr(node, 'type'):
|
|
1607
|
+
return None
|
|
1608
|
+
|
|
1609
|
+
if node.type == 'return':
|
|
1610
|
+
# Found a return - evaluate it
|
|
1611
|
+
if node.value is None:
|
|
1612
|
+
return None
|
|
1613
|
+
if isinstance(node.value, dict) and node.value.get('multiple'):
|
|
1614
|
+
# Multiple return values (shuffled)
|
|
1615
|
+
return tuple(
|
|
1616
|
+
self._runtime._evaluate(v) for v in node.value.get('values', [])
|
|
1617
|
+
)
|
|
1618
|
+
return self._runtime._evaluate(node.value)
|
|
1619
|
+
|
|
1620
|
+
# v4.3.2: Handle if statements by evaluating condition
|
|
1621
|
+
if node.type == 'if':
|
|
1622
|
+
condition = node.value.get('condition')
|
|
1623
|
+
if condition:
|
|
1624
|
+
# Evaluate the condition
|
|
1625
|
+
cond_result = self._runtime._evaluate(condition)
|
|
1626
|
+
if cond_result:
|
|
1627
|
+
# Condition is true - check children (then block)
|
|
1628
|
+
if node.children:
|
|
1629
|
+
for child in node.children:
|
|
1630
|
+
ret_val = self._extract_return_value(child)
|
|
1631
|
+
if ret_val is not None:
|
|
1632
|
+
return ret_val
|
|
1633
|
+
else:
|
|
1634
|
+
# Condition is false - check else_block if present
|
|
1635
|
+
else_block = node.value.get('else_block')
|
|
1636
|
+
if else_block:
|
|
1637
|
+
for child in else_block:
|
|
1638
|
+
ret_val = self._extract_return_value(child)
|
|
1639
|
+
if ret_val is not None:
|
|
1640
|
+
return ret_val
|
|
1641
|
+
return None
|
|
1642
|
+
|
|
1643
|
+
# Check children for returns
|
|
1644
|
+
if hasattr(node, 'children') and node.children:
|
|
1645
|
+
for child in node.children:
|
|
1646
|
+
ret_val = self._extract_return_value(child)
|
|
1647
|
+
if ret_val is not None:
|
|
1648
|
+
return ret_val
|
|
1649
|
+
|
|
1650
|
+
return None
|
|
1651
|
+
|
|
1536
1652
|
def _match_pattern(self, pattern: List[Dict], values: List[Any]) -> bool:
|
|
1537
1653
|
"""Check if pattern matches the current values."""
|
|
1538
1654
|
for i, p in enumerate(pattern):
|
|
@@ -1570,6 +1686,16 @@ class ByteArrayed:
|
|
|
1570
1686
|
var_value = self._runtime.global_scope.get(var_name)
|
|
1571
1687
|
if value != var_value:
|
|
1572
1688
|
return False
|
|
1689
|
+
elif p_type == 'list':
|
|
1690
|
+
# v4.3.2: Match against list value: ["read", "write"]
|
|
1691
|
+
pattern_list = p.get('values', [])
|
|
1692
|
+
if not isinstance(value, (list, tuple)):
|
|
1693
|
+
return False
|
|
1694
|
+
if len(value) != len(pattern_list):
|
|
1695
|
+
return False
|
|
1696
|
+
for j, pval in enumerate(pattern_list):
|
|
1697
|
+
if value[j] != pval:
|
|
1698
|
+
return False
|
|
1573
1699
|
|
|
1574
1700
|
return True
|
|
1575
1701
|
|
|
@@ -1597,8 +1723,14 @@ class ByteArrayed:
|
|
|
1597
1723
|
if not self._runtime:
|
|
1598
1724
|
return None
|
|
1599
1725
|
result = None
|
|
1600
|
-
|
|
1601
|
-
|
|
1726
|
+
try:
|
|
1727
|
+
for node in body:
|
|
1728
|
+
result = self._runtime._execute_node(node)
|
|
1729
|
+
except Exception as e:
|
|
1730
|
+
# v4.3.2: Catch CSSLReturn exception by name to handle return statements
|
|
1731
|
+
if type(e).__name__ == 'CSSLReturn':
|
|
1732
|
+
return e.value
|
|
1733
|
+
raise
|
|
1602
1734
|
return result
|
|
1603
1735
|
|
|
1604
1736
|
def __getitem__(self, key: Union[int, str]) -> Any:
|
includecpp/core/cssl_bridge.py
CHANGED
|
@@ -410,6 +410,7 @@ class CsslLang:
|
|
|
410
410
|
Execute CSSL code or file.
|
|
411
411
|
|
|
412
412
|
This is the primary method for running CSSL code in v3.8.0+.
|
|
413
|
+
Uses C++ acceleration when available (375x+ faster).
|
|
413
414
|
|
|
414
415
|
Args:
|
|
415
416
|
path_or_code: Path to .cssl file or CSSL code string
|
|
@@ -425,22 +426,44 @@ class CsslLang:
|
|
|
425
426
|
printl("Hello " + parameter.get(0));
|
|
426
427
|
''', "World")
|
|
427
428
|
"""
|
|
428
|
-
runtime = self._get_runtime()
|
|
429
|
-
|
|
430
429
|
# Check if it's a file path (not code)
|
|
431
430
|
# Code detection: contains newlines, semicolons, or braces = definitely code
|
|
432
431
|
is_likely_code = '\n' in path_or_code or ';' in path_or_code or '{' in path_or_code
|
|
433
432
|
source = path_or_code
|
|
433
|
+
is_file = False
|
|
434
|
+
file_path = None
|
|
434
435
|
|
|
435
436
|
if not is_likely_code:
|
|
436
437
|
try:
|
|
437
438
|
path = Path(path_or_code)
|
|
438
439
|
if path.exists() and path.suffix in ('.cssl', '.cssl-mod', '.cssl-pl'):
|
|
440
|
+
is_file = True
|
|
441
|
+
file_path = str(path.absolute())
|
|
439
442
|
source = path.read_text(encoding='utf-8')
|
|
440
443
|
except OSError:
|
|
441
444
|
# Path too long or invalid - treat as code
|
|
442
445
|
pass
|
|
443
446
|
|
|
447
|
+
# Try C++ accelerated execution first (375x faster)
|
|
448
|
+
# Only use C++ for simple scripts without parameter passing
|
|
449
|
+
if not args:
|
|
450
|
+
try:
|
|
451
|
+
from .cssl import run_cssl, run_cssl_file
|
|
452
|
+
if is_file and file_path:
|
|
453
|
+
return run_cssl_file(file_path)
|
|
454
|
+
else:
|
|
455
|
+
return run_cssl(source)
|
|
456
|
+
except Exception as cpp_error:
|
|
457
|
+
# Fall back to Python for unsupported features
|
|
458
|
+
error_msg = str(cpp_error).lower()
|
|
459
|
+
if 'unsupported' not in error_msg and 'not implemented' not in error_msg:
|
|
460
|
+
# Real error - re-raise it
|
|
461
|
+
raise RuntimeError(str(cpp_error)) from cpp_error
|
|
462
|
+
# Otherwise fall through to Python
|
|
463
|
+
|
|
464
|
+
# Python execution (for scripts with args or when C++ fails)
|
|
465
|
+
runtime = self._get_runtime()
|
|
466
|
+
|
|
444
467
|
# Set arguments in runtime scope
|
|
445
468
|
from .cssl import Parameter
|
|
446
469
|
param = Parameter(list(args))
|
|
@@ -459,6 +482,17 @@ class CsslLang:
|
|
|
459
482
|
return returns[0] if len(returns) == 1 else returns
|
|
460
483
|
|
|
461
484
|
return result
|
|
485
|
+
except UnicodeEncodeError as e:
|
|
486
|
+
# v4.3.2: Catch unicode/emoji encoding errors and provide helpful message
|
|
487
|
+
char = e.object[e.start:e.end] if hasattr(e, 'object') else '?'
|
|
488
|
+
error_msg = (
|
|
489
|
+
f"Unicode encoding error: Character '{char}' cannot be displayed.\n"
|
|
490
|
+
f" The console encoding ({e.encoding}) doesn't support this character.\n\n"
|
|
491
|
+
f" Hint: Use encode() to safely handle emojis/unicode:\n"
|
|
492
|
+
f" printl(\"Status: \" + encode(\"{char}\"));\n"
|
|
493
|
+
f" printl(encode(\"Your text with emojis\", \"[emoji]\"));"
|
|
494
|
+
)
|
|
495
|
+
raise RuntimeError(error_msg) from e
|
|
462
496
|
except Exception as e:
|
|
463
497
|
# Format error message nicely - don't add prefixes, let CLI handle that
|
|
464
498
|
error_msg = str(e)
|
includecpp/generator/parser.cpp
CHANGED
|
@@ -992,19 +992,32 @@ std::string generate_struct_bindings(const StructBinding& sb, const ModuleDescri
|
|
|
992
992
|
code << " })\n";
|
|
993
993
|
|
|
994
994
|
// Auto-generate from_dict() static method
|
|
995
|
-
|
|
996
|
-
|
|
995
|
+
// v4.3.2: Check if all fields have known types (not "auto")
|
|
996
|
+
bool template_all_types_known = true;
|
|
997
997
|
for (const auto& [field_type, field_name] : sb.fields) {
|
|
998
998
|
std::string actual_type = field_type;
|
|
999
|
-
if (actual_type == "T")
|
|
1000
|
-
|
|
999
|
+
if (actual_type == "T") actual_type = ttype;
|
|
1000
|
+
if (actual_type == "auto" || actual_type.empty()) {
|
|
1001
|
+
template_all_types_known = false;
|
|
1002
|
+
break;
|
|
1001
1003
|
}
|
|
1004
|
+
}
|
|
1002
1005
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1006
|
+
if (template_all_types_known && !sb.fields.empty()) {
|
|
1007
|
+
code << " .def_static(\"from_dict\", [](py::dict d) {\n";
|
|
1008
|
+
code << " " << cpp_type << " obj;\n";
|
|
1009
|
+
for (const auto& [field_type, field_name] : sb.fields) {
|
|
1010
|
+
std::string actual_type = field_type;
|
|
1011
|
+
if (actual_type == "T") {
|
|
1012
|
+
actual_type = ttype;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
code << " obj." << field_name << " = d[\"" << field_name
|
|
1016
|
+
<< "\"].cast<" << actual_type << ">();\n";
|
|
1017
|
+
}
|
|
1018
|
+
code << " return obj;\n";
|
|
1019
|
+
code << " })\n";
|
|
1005
1020
|
}
|
|
1006
|
-
code << " return obj;\n";
|
|
1007
|
-
code << " })\n";
|
|
1008
1021
|
|
|
1009
1022
|
// v2.8: Add __repr__ for better debugging output
|
|
1010
1023
|
code << " .def(\"__repr__\", [](" << cpp_type << "& self) {\n";
|
|
@@ -1052,14 +1065,25 @@ std::string generate_struct_bindings(const StructBinding& sb, const ModuleDescri
|
|
|
1052
1065
|
code << " })\n";
|
|
1053
1066
|
|
|
1054
1067
|
// Auto-generate from_dict() static method
|
|
1055
|
-
|
|
1056
|
-
|
|
1068
|
+
// v4.3.2: Check if all fields have known types (not "auto")
|
|
1069
|
+
bool all_types_known = true;
|
|
1057
1070
|
for (const auto& [field_type, field_name] : sb.fields) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1071
|
+
if (field_type == "auto" || field_type.empty()) {
|
|
1072
|
+
all_types_known = false;
|
|
1073
|
+
break;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
if (all_types_known && !sb.fields.empty()) {
|
|
1078
|
+
code << " .def_static(\"from_dict\", [](py::dict d) {\n";
|
|
1079
|
+
code << " " << sb.struct_name << " obj;\n";
|
|
1080
|
+
for (const auto& [field_type, field_name] : sb.fields) {
|
|
1081
|
+
code << " obj." << field_name << " = d[\"" << field_name
|
|
1082
|
+
<< "\"].cast<" << field_type << ">();\n";
|
|
1083
|
+
}
|
|
1084
|
+
code << " return obj;\n";
|
|
1085
|
+
code << " })\n";
|
|
1060
1086
|
}
|
|
1061
|
-
code << " return obj;\n";
|
|
1062
|
-
code << " })\n";
|
|
1063
1087
|
|
|
1064
1088
|
// v2.8: Add __repr__ for better debugging output
|
|
1065
1089
|
code << " .def(\"__repr__\", [](" << sb.struct_name << "& self) {\n";
|
|
@@ -56,6 +56,16 @@
|
|
|
56
56
|
"light": "./images/cssl_pl.png",
|
|
57
57
|
"dark": "./images/cssl_pl.png"
|
|
58
58
|
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "cp",
|
|
62
|
+
"aliases": ["IncludeCPP Plugin", "cp"],
|
|
63
|
+
"extensions": [".cp"],
|
|
64
|
+
"configuration": "./language-configuration.json",
|
|
65
|
+
"icon": {
|
|
66
|
+
"light": "./images/cssl.png",
|
|
67
|
+
"dark": "./images/cssl.png"
|
|
68
|
+
}
|
|
59
69
|
}
|
|
60
70
|
],
|
|
61
71
|
"grammars": [
|
|
@@ -73,6 +83,11 @@
|
|
|
73
83
|
"language": "cssl-pl",
|
|
74
84
|
"scopeName": "source.cssl",
|
|
75
85
|
"path": "./syntaxes/cssl.tmLanguage.json"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"language": "cp",
|
|
89
|
+
"scopeName": "source.cssl",
|
|
90
|
+
"path": "./syntaxes/cssl.tmLanguage.json"
|
|
76
91
|
}
|
|
77
92
|
],
|
|
78
93
|
"snippets": [
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "CSSL",
|
|
4
4
|
"scopeName": "source.cssl",
|
|
5
5
|
"patterns": [
|
|
6
|
+
{ "include": "#cp-plugin-syntax" },
|
|
6
7
|
{ "include": "#super-functions" },
|
|
7
8
|
{ "include": "#comments" },
|
|
8
9
|
{ "include": "#strings" },
|
|
@@ -38,6 +39,82 @@
|
|
|
38
39
|
{ "include": "#variables" }
|
|
39
40
|
],
|
|
40
41
|
"repository": {
|
|
42
|
+
"cp-plugin-syntax": {
|
|
43
|
+
"comment": "IncludeCPP Plugin File (.cp) Syntax Highlighting",
|
|
44
|
+
"patterns": [
|
|
45
|
+
{
|
|
46
|
+
"comment": "SOURCE(file.cpp) modulename - directive keyword",
|
|
47
|
+
"name": "meta.source-directive.cp",
|
|
48
|
+
"match": "^\\s*(SOURCE|HEADER)\\s*\\(\\s*([^)]+)\\s*\\)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
|
|
49
|
+
"captures": {
|
|
50
|
+
"1": { "name": "keyword.control.directive.cp" },
|
|
51
|
+
"2": { "name": "string.quoted.other.cp" },
|
|
52
|
+
"3": { "name": "entity.name.namespace.cssl" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"comment": "PUBLIC( block start",
|
|
57
|
+
"name": "keyword.control.directive.cp",
|
|
58
|
+
"match": "^\\s*(PUBLIC)\\s*\\("
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"comment": "modulename FUNC(name) - function export",
|
|
62
|
+
"name": "meta.func-export.cp",
|
|
63
|
+
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+(FUNC|TEMPLATE_FUNC)\\s*\\(\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\)",
|
|
64
|
+
"captures": {
|
|
65
|
+
"1": { "name": "entity.name.namespace.cssl" },
|
|
66
|
+
"2": { "name": "keyword.control.directive.cp" },
|
|
67
|
+
"3": { "name": "support.class.cssl" }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"comment": "modulename CLASS(Name) - class export",
|
|
72
|
+
"name": "meta.class-export.cp",
|
|
73
|
+
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+(CLASS|STRUCT)\\s*\\(\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\)",
|
|
74
|
+
"captures": {
|
|
75
|
+
"1": { "name": "entity.name.namespace.cssl" },
|
|
76
|
+
"2": { "name": "keyword.control.directive.cp" },
|
|
77
|
+
"3": { "name": "support.class.cssl" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"comment": "METHOD(name) - method export",
|
|
82
|
+
"name": "meta.method-export.cp",
|
|
83
|
+
"match": "\\b(METHOD|METHOD_CONST|FIELD)\\s*\\(\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\)",
|
|
84
|
+
"captures": {
|
|
85
|
+
"1": { "name": "keyword.control.directive.cp" },
|
|
86
|
+
"2": { "name": "support.class.cssl" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"comment": "CONSTRUCTOR() - constructor export",
|
|
91
|
+
"name": "meta.constructor-export.cp",
|
|
92
|
+
"match": "\\b(CONSTRUCTOR)\\s*\\(([^)]*)\\)",
|
|
93
|
+
"captures": {
|
|
94
|
+
"1": { "name": "keyword.control.directive.cp" },
|
|
95
|
+
"2": { "name": "storage.type.cssl" }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"comment": "DEPENDS(...) - dependency declaration",
|
|
100
|
+
"name": "meta.depends.cp",
|
|
101
|
+
"match": "\\b(DEPENDS)\\s*\\(([^)]*)\\)",
|
|
102
|
+
"captures": {
|
|
103
|
+
"1": { "name": "keyword.control.directive.cp" },
|
|
104
|
+
"2": { "name": "entity.name.namespace.cssl" }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"comment": "TYPES(...) - template types",
|
|
109
|
+
"name": "meta.types.cp",
|
|
110
|
+
"match": "\\b(TYPES)\\s*\\(([^)]*)\\)",
|
|
111
|
+
"captures": {
|
|
112
|
+
"1": { "name": "keyword.control.directive.cp" },
|
|
113
|
+
"2": { "name": "storage.type.cssl" }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
41
118
|
"append-operator": {
|
|
42
119
|
"patterns": [
|
|
43
120
|
{
|
|
@@ -445,6 +522,16 @@
|
|
|
445
522
|
"name": "storage.modifier.extends.cssl",
|
|
446
523
|
"match": "\\b(extends|overwrites)\\b"
|
|
447
524
|
},
|
|
525
|
+
{
|
|
526
|
+
"comment": "new Namespace::ClassName() - namespaced class instantiation",
|
|
527
|
+
"name": "meta.new-expression.namespaced.cssl",
|
|
528
|
+
"match": "\\b(new)\\s+([A-Za-z_][A-Za-z0-9_]*)::([A-Za-z_][A-Za-z0-9_]*)\\s*\\(",
|
|
529
|
+
"captures": {
|
|
530
|
+
"1": { "name": "keyword.operator.new.cssl" },
|
|
531
|
+
"2": { "name": "entity.name.namespace.cssl" },
|
|
532
|
+
"3": { "name": "support.class.cssl" }
|
|
533
|
+
}
|
|
534
|
+
},
|
|
448
535
|
{
|
|
449
536
|
"comment": "new ClassName() - class instantiation with turquoise class name",
|
|
450
537
|
"name": "meta.new-expression.cssl",
|
|
@@ -458,6 +545,15 @@
|
|
|
458
545
|
"name": "keyword.operator.new.cssl",
|
|
459
546
|
"match": "\\bnew\\b"
|
|
460
547
|
},
|
|
548
|
+
{
|
|
549
|
+
"comment": "Namespace::identifier - general namespaced access",
|
|
550
|
+
"name": "meta.namespace-access.cssl",
|
|
551
|
+
"match": "\\b([A-Za-z_][A-Za-z0-9_]*)::([A-Za-z_][A-Za-z0-9_]*)",
|
|
552
|
+
"captures": {
|
|
553
|
+
"1": { "name": "entity.name.namespace.cssl" },
|
|
554
|
+
"2": { "name": "support.class.cssl" }
|
|
555
|
+
}
|
|
556
|
+
},
|
|
461
557
|
{
|
|
462
558
|
"name": "variable.language.this.cssl",
|
|
463
559
|
"match": "\\bthis\\b"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
includecpp/CHANGELOG.md,sha256=
|
|
1
|
+
includecpp/CHANGELOG.md,sha256=zgkItpsqSDaa9oAaax88xgUHoU60ASDQuXFbKUeimi4,4909
|
|
2
2
|
includecpp/DOCUMENTATION.md,sha256=MgCUZtslObxTqTLnxjME34NcGo4Z1h_C3n6gcDs82r0,7961
|
|
3
|
-
includecpp/__init__.py,sha256=
|
|
4
|
-
includecpp/__init__.pyi,sha256=
|
|
3
|
+
includecpp/__init__.py,sha256=u__pqAfPtmUYuodOLlSWMtIHS5t6caaIChpY194dsAc,1672
|
|
4
|
+
includecpp/__init__.pyi,sha256=Gk5f1DegO1YpKgBQ_liPWjNzJQJ0n_20pGCJ2hMnHx8,7156
|
|
5
5
|
includecpp/__main__.py,sha256=d6QK0PkvUe1ENofpmHRAg3bwNbZr8PiRscfI3-WRfVg,72
|
|
6
6
|
includecpp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
includecpp/cli/__init__.py,sha256=Yda-4a5QJb_tKu35YQNfc5lu-LewTsM5abqNNkzS47M,113
|
|
8
|
-
includecpp/cli/commands.py,sha256=
|
|
8
|
+
includecpp/cli/commands.py,sha256=Rf-ISWe0nIpV-C1VdnwNvKV0thGwePdIpTUz19zAIfs,418783
|
|
9
9
|
includecpp/cli/config_parser.py,sha256=KveeYUg2TA9sC5hKVzYYfgdNm2WfLG5y7_yxgBWn9yM,4886
|
|
10
10
|
includecpp/core/__init__.py,sha256=L1bT6oikTjdto-6Px7DpjePtM07ymo3Bnov1saZzsGg,390
|
|
11
11
|
includecpp/core/ai_integration.py,sha256=Q44Y1SD_4yXETO4AwtoR51QnX0T4Tc14_Ux9VozQJhQ,89146
|
|
12
12
|
includecpp/core/build_manager.py,sha256=uLuYsuiC6OsOGaU5wAJfl4M3IbdnIDgogfMd8VsVpq8,102866
|
|
13
13
|
includecpp/core/cpp_api.py,sha256=8y_B1L18rhSBZln654xPPzqO2PdvAlLpJrfEjzl7Wnc,14039
|
|
14
14
|
includecpp/core/cpp_api.pyi,sha256=IEiaKqaPItnn6rjL7aK32D3o9FYmRYCgCZbqiQNUwdc,3496
|
|
15
|
-
includecpp/core/cpp_api_extensions.pyi,sha256=
|
|
15
|
+
includecpp/core/cpp_api_extensions.pyi,sha256=eqqi7A1pUGg9GTDpWLWViNFNdQZ0AG8rV0oSysynJvs,10432
|
|
16
16
|
includecpp/core/cppy_converter.py,sha256=b7yqu-aoa0wShNY0GvQT67TnNhYya4GyYmG7oDdqDV4,156686
|
|
17
|
-
includecpp/core/cssl_bridge.py,sha256=
|
|
17
|
+
includecpp/core/cssl_bridge.py,sha256=o8huFAOg9_OQt0opZeT2nX1CtuH-iSNnAgvFG-KWil4,51755
|
|
18
18
|
includecpp/core/cssl_bridge.pyi,sha256=nreh2gtK94I6VFrzTWcYVUHN97wcYQF0dY_-HySi7yQ,28787
|
|
19
19
|
includecpp/core/error_catalog.py,sha256=VS3N-P0yEbiHimsDPtcaYfrUb7mXQ-7pqw18PtSngaU,33869
|
|
20
20
|
includecpp/core/error_formatter.py,sha256=7-MzRIT8cM4uODxy0IZ9pu7pqR4Pq2I8Si0QQZHjmVc,39239
|
|
@@ -24,18 +24,27 @@ includecpp/core/project_ui.py,sha256=la2EQZKmUkJGuJxnbs09hH1ZhBh9bfndo6okzZsk2dQ
|
|
|
24
24
|
includecpp/core/settings_ui.py,sha256=B2SlwgdplF2KiBk5UYf2l8Jjifjd0F-FmBP0DPsVCEQ,11798
|
|
25
25
|
includecpp/core/cssl/CSSL_DOCUMENTATION.md,sha256=Ax7x6h_ZFg4rhghtSNG9dahySh-bJc2upEqP4E-mfck,43486
|
|
26
26
|
includecpp/core/cssl/CSSL_DOCUMENTATION_NEW.md,sha256=I_bVeKWlbcgHYkl2o9L2vk3r5sDvG44bGh__RJIYduw,28222
|
|
27
|
-
includecpp/core/cssl/__init__.py,sha256=
|
|
28
|
-
includecpp/core/cssl/cssl_builtins.py,sha256=
|
|
27
|
+
includecpp/core/cssl/__init__.py,sha256=46EcmJKxziXupgqhqBRnMl5QlvUP6KA8x6JGlls_JyY,11993
|
|
28
|
+
includecpp/core/cssl/cssl_builtins.py,sha256=pAm0lHzdI3DraNVGrVlZM-RfJF76rDsmKCUS1iMk7IE,118787
|
|
29
29
|
includecpp/core/cssl/cssl_builtins.pyi,sha256=-yr9JbxHKFv9Vc1iufChcqCQvNQLL3-Ow_Hgg0YwQnc,135180
|
|
30
|
+
includecpp/core/cssl/cssl_compiler.py,sha256=0yv8qbCm7ikC5pZXhYvAiNM5oBZmiNgVyyjrCtyjieg,14409
|
|
30
31
|
includecpp/core/cssl/cssl_events.py,sha256=nupIcXW_Vjdud7zCU6hdwkQRQ0MujlPM7Tk2u7eDAiY,21013
|
|
31
32
|
includecpp/core/cssl/cssl_languages.py,sha256=qftMcBiNT1pbIn5OniTZDx8rFtGYU4yx4Iw1QYKAC1U,62342
|
|
32
33
|
includecpp/core/cssl/cssl_modules.py,sha256=cUg0-zdymMnWWTsA_BUrW5dx4R04dHpKcUhm-Wfiwwo,103006
|
|
33
|
-
includecpp/core/cssl/
|
|
34
|
-
includecpp/core/cssl/
|
|
35
|
-
includecpp/core/cssl/
|
|
36
|
-
includecpp/core/cssl/
|
|
34
|
+
includecpp/core/cssl/cssl_optimizer.py,sha256=EUWGkd-N4KeI98ENXOkIGQVmz68VE2AGOG_7cYHMsh4,28322
|
|
35
|
+
includecpp/core/cssl/cssl_parser.py,sha256=hXn693e4uucYUkcPFfvSIgtz-OJL5YCxm6idJmqHTBY,212208
|
|
36
|
+
includecpp/core/cssl/cssl_runtime.py,sha256=m1LdghxYhw6oolkEgvDcgHLgqH1xoDhDNcRI8cJynEo,271043
|
|
37
|
+
includecpp/core/cssl/cssl_syntax.py,sha256=RLvpDymbe66eubD51dcICtDcKyJQ2qQ5IxPNp9SlhW4,21730
|
|
38
|
+
includecpp/core/cssl/cssl_types.py,sha256=ZqUfDRNH1V_c0qsDbfAXz8nfkTSZ9DIlr5VTGd-udak,73090
|
|
39
|
+
includecpp/core/cssl/cpp/cssl_core.cp,sha256=0ycXtd7IEIPCq11-uS-WZpD-6ShVgIqD_tMGBVnaut8,2944
|
|
40
|
+
includecpp/core/cssl/cpp/cssl_lexer.hpp,sha256=ItpblJWnu2BnaAUNsmGwJEjOJPjzTCJlygvpel9MI3g,7563
|
|
41
|
+
includecpp/core/cssl/cpp/build/api.pyd,sha256=Cf129k9jtZj2Df7eu8zS513nVlYDPClSiCQTFGQYdFI,4267449
|
|
42
|
+
includecpp/core/cssl/cpp/build/cssl_core.pyi,sha256=pAxrzrkH9r81mbhdIx9HoEq1vbgs2B69ADuocTM303M,7228
|
|
43
|
+
includecpp/core/cssl/cpp/build/libgcc_s_seh-1.dll,sha256=LeQ1VkhEHbAjCpq6GhSfyCmwlPg8FMN-o_d1NW0z2LE,150196
|
|
44
|
+
includecpp/core/cssl/cpp/build/libstdc++-6.dll,sha256=Qo0iqKTSXjntrTaFESJwGzRgwrz2KIhM3SZkUw0t1jQ,2461848
|
|
45
|
+
includecpp/core/cssl/cpp/build/libwinpthread-1.dll,sha256=8MSLzx8fCmW0-ZQG9W23NJ3tiGbNhlSGh6tqmOhZrzU,64403
|
|
37
46
|
includecpp/generator/__init__.py,sha256=Rsy41bwimaEloD3gDRR_znPfIJzIsCFuWZgCTJBLJlc,62
|
|
38
|
-
includecpp/generator/parser.cpp,sha256=
|
|
47
|
+
includecpp/generator/parser.cpp,sha256=4zOlMe0VmMqlDAHhm92Ug0rx4C7WbmCkKuHPluqfIX8,84285
|
|
39
48
|
includecpp/generator/parser.h,sha256=z8qHnsiY8cXAwq5JW9O-V-hCSjDQacYLgi91ViqzHSw,11405
|
|
40
49
|
includecpp/generator/type_resolver.cpp,sha256=MmFK_4HXd1wqxALDiDyXVuU397SXoQL_o5zb_8N8Hzs,12346
|
|
41
50
|
includecpp/generator/type_resolver.h,sha256=ZsaxQqcCcKJJApYn7KOp2dLlQ1VFVG_oZDjaK5LhBSg,2590
|
|
@@ -44,14 +53,14 @@ includecpp/vscode/__init__.py,sha256=yLKw-_7MTX1Rx3jLk5JjharJQfFXbwtZVE7YqHpM7yg
|
|
|
44
53
|
includecpp/vscode/cssl/__init__.py,sha256=rQJAx5X05v-mAwqX1Qb-rbZO219iR73MziFNRUCNUIo,31
|
|
45
54
|
includecpp/vscode/cssl/extension.js,sha256=FZaKfOpzo2jXtubVCZmnhDZd4eUVHltm5VW_fgNnSkE,4327
|
|
46
55
|
includecpp/vscode/cssl/language-configuration.json,sha256=61Q00cKI9may5L8YpxMmvfo6PAc-abdJqApfR85DWuw,904
|
|
47
|
-
includecpp/vscode/cssl/package.json,sha256=
|
|
56
|
+
includecpp/vscode/cssl/package.json,sha256=v0QNcE1u_F2BzHBzLy6nztZWl_OMYgoomHG-0g24S-U,6931
|
|
48
57
|
includecpp/vscode/cssl/images/cssl.png,sha256=BxAGsnfS0ZzzCvqV6Zb1OAJAZpDUoXlR86MsvUGlSZw,510
|
|
49
58
|
includecpp/vscode/cssl/images/cssl_pl.png,sha256=z4WMk7g6YCTbUUbSFk343BO6yi_OmNEVYkRenWGydwM,799
|
|
50
59
|
includecpp/vscode/cssl/snippets/cssl.snippets.json,sha256=uV3nHJyQ5f7Pr3FzfbQT2VZOEY3AlGs4wrmqe884jm4,37372
|
|
51
|
-
includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json,sha256=
|
|
52
|
-
includecpp-4.
|
|
53
|
-
includecpp-4.
|
|
54
|
-
includecpp-4.
|
|
55
|
-
includecpp-4.
|
|
56
|
-
includecpp-4.
|
|
57
|
-
includecpp-4.
|
|
60
|
+
includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json,sha256=DOruG97tnY-OuQqiGciXwUE9kofb1THb03kKMhUQ4-E,49505
|
|
61
|
+
includecpp-4.5.2.dist-info/licenses/LICENSE,sha256=fWCsGGsiWZir0UzDd20Hh-3wtRyk1zqUntvtVuAWhvc,1093
|
|
62
|
+
includecpp-4.5.2.dist-info/METADATA,sha256=j0ZykypVIRVHS0ygW41i-t1tVhgYL7Z2l6lY2ZuDVLw,5887
|
|
63
|
+
includecpp-4.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
64
|
+
includecpp-4.5.2.dist-info/entry_points.txt,sha256=6A5Mif9gi0139Bf03W5plAb3wnAgbNaEVe1HJoGE-2o,59
|
|
65
|
+
includecpp-4.5.2.dist-info/top_level.txt,sha256=RFUaR1KG-M6mCYwP6w4ydP5Cgc8yNbP78jxGAvyjMa8,11
|
|
66
|
+
includecpp-4.5.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|