IncludeCPP 3.7.15__py3-none-any.whl → 3.7.17__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/__init__.py +1 -1
- includecpp/core/cssl/cssl_builtins.py +59 -2
- includecpp/core/cssl/cssl_builtins.pyi +380 -3
- includecpp/core/cssl/cssl_types.py +4 -1
- {includecpp-3.7.15.dist-info → includecpp-3.7.17.dist-info}/METADATA +1 -1
- {includecpp-3.7.15.dist-info → includecpp-3.7.17.dist-info}/RECORD +10 -10
- {includecpp-3.7.15.dist-info → includecpp-3.7.17.dist-info}/WHEEL +0 -0
- {includecpp-3.7.15.dist-info → includecpp-3.7.17.dist-info}/entry_points.txt +0 -0
- {includecpp-3.7.15.dist-info → includecpp-3.7.17.dist-info}/licenses/LICENSE +0 -0
- {includecpp-3.7.15.dist-info → includecpp-3.7.17.dist-info}/top_level.txt +0 -0
includecpp/__init__.py
CHANGED
|
@@ -1044,6 +1044,13 @@ class CSSLBuiltins:
|
|
|
1044
1044
|
Usage: instance::getMethods(@module) or instance::getMethods($obj)
|
|
1045
1045
|
Returns list of method names.
|
|
1046
1046
|
"""
|
|
1047
|
+
from .cssl_types import CSSLInstance
|
|
1048
|
+
|
|
1049
|
+
# Handle CSSL class instances
|
|
1050
|
+
if isinstance(obj, CSSLInstance):
|
|
1051
|
+
return list(obj._class.methods.keys())
|
|
1052
|
+
|
|
1053
|
+
# Handle Python objects
|
|
1047
1054
|
import inspect
|
|
1048
1055
|
methods = []
|
|
1049
1056
|
for name in dir(obj):
|
|
@@ -1058,6 +1065,13 @@ class CSSLBuiltins:
|
|
|
1058
1065
|
Usage: instance::getClasses(@module)
|
|
1059
1066
|
Returns list of class names.
|
|
1060
1067
|
"""
|
|
1068
|
+
from .cssl_types import CSSLInstance
|
|
1069
|
+
|
|
1070
|
+
# Handle CSSL class instances - they don't contain nested classes
|
|
1071
|
+
if isinstance(obj, CSSLInstance):
|
|
1072
|
+
return [obj._class.name] # Return the class name itself
|
|
1073
|
+
|
|
1074
|
+
# Handle Python objects
|
|
1061
1075
|
import inspect
|
|
1062
1076
|
classes = []
|
|
1063
1077
|
for name in dir(obj):
|
|
@@ -1072,6 +1086,13 @@ class CSSLBuiltins:
|
|
|
1072
1086
|
Usage: instance::getVars(@module)
|
|
1073
1087
|
Returns list of variable names.
|
|
1074
1088
|
"""
|
|
1089
|
+
from .cssl_types import CSSLInstance
|
|
1090
|
+
|
|
1091
|
+
# Handle CSSL class instances
|
|
1092
|
+
if isinstance(obj, CSSLInstance):
|
|
1093
|
+
return list(obj._members.keys())
|
|
1094
|
+
|
|
1095
|
+
# Handle Python objects
|
|
1075
1096
|
vars_list = []
|
|
1076
1097
|
for name in dir(obj):
|
|
1077
1098
|
if not name.startswith('_'):
|
|
@@ -1085,12 +1106,23 @@ class CSSLBuiltins:
|
|
|
1085
1106
|
Usage: instance::getAll(@module)
|
|
1086
1107
|
Returns dict with 'methods', 'classes', 'vars' keys.
|
|
1087
1108
|
"""
|
|
1088
|
-
import
|
|
1109
|
+
from .cssl_types import CSSLInstance
|
|
1110
|
+
|
|
1089
1111
|
result = {
|
|
1090
1112
|
'methods': [],
|
|
1091
1113
|
'classes': [],
|
|
1092
1114
|
'vars': []
|
|
1093
1115
|
}
|
|
1116
|
+
|
|
1117
|
+
# Handle CSSL class instances
|
|
1118
|
+
if isinstance(obj, CSSLInstance):
|
|
1119
|
+
result['methods'] = list(obj._class.methods.keys())
|
|
1120
|
+
result['classes'] = [obj._class.name]
|
|
1121
|
+
result['vars'] = list(obj._members.keys())
|
|
1122
|
+
return result
|
|
1123
|
+
|
|
1124
|
+
# Handle Python objects
|
|
1125
|
+
import inspect
|
|
1094
1126
|
for name in dir(obj):
|
|
1095
1127
|
if not name.startswith('_'):
|
|
1096
1128
|
attr = getattr(obj, name, None)
|
|
@@ -1106,21 +1138,46 @@ class CSSLBuiltins:
|
|
|
1106
1138
|
"""Dynamically call a method on an object.
|
|
1107
1139
|
Usage: instance::call(@module, 'methodName', arg1, arg2)
|
|
1108
1140
|
"""
|
|
1141
|
+
from .cssl_types import CSSLInstance
|
|
1142
|
+
|
|
1143
|
+
# Handle CSSL class instances
|
|
1144
|
+
if isinstance(obj, CSSLInstance):
|
|
1145
|
+
if obj.has_method(method_name):
|
|
1146
|
+
# Need runtime to call the method
|
|
1147
|
+
if self.runtime:
|
|
1148
|
+
return self.runtime._call_method(obj, obj.get_method(method_name), list(args), kwargs or {})
|
|
1149
|
+
raise RuntimeError(f"Method '{method_name}' not found on CSSL instance")
|
|
1150
|
+
|
|
1151
|
+
# Handle Python objects
|
|
1109
1152
|
method = getattr(obj, method_name, None)
|
|
1110
1153
|
if method and callable(method):
|
|
1111
1154
|
return method(*args, **kwargs)
|
|
1112
1155
|
raise RuntimeError(f"Method '{method_name}' not found on object")
|
|
1113
1156
|
|
|
1114
1157
|
def builtin_instance_has(self, obj: Any, name: str) -> bool:
|
|
1115
|
-
"""Check if object has an attribute.
|
|
1158
|
+
"""Check if object has an attribute or method.
|
|
1116
1159
|
Usage: instance::has(@module, 'methodName')
|
|
1117
1160
|
"""
|
|
1161
|
+
from .cssl_types import CSSLInstance
|
|
1162
|
+
|
|
1163
|
+
# Handle CSSL class instances
|
|
1164
|
+
if isinstance(obj, CSSLInstance):
|
|
1165
|
+
return obj.has_member(name) or obj.has_method(name)
|
|
1166
|
+
|
|
1167
|
+
# Handle Python objects
|
|
1118
1168
|
return hasattr(obj, name)
|
|
1119
1169
|
|
|
1120
1170
|
def builtin_instance_type(self, obj: Any) -> str:
|
|
1121
1171
|
"""Get the type name of an object.
|
|
1122
1172
|
Usage: instance::type(@module)
|
|
1123
1173
|
"""
|
|
1174
|
+
from .cssl_types import CSSLInstance
|
|
1175
|
+
|
|
1176
|
+
# Handle CSSL class instances
|
|
1177
|
+
if isinstance(obj, CSSLInstance):
|
|
1178
|
+
return obj._class.name
|
|
1179
|
+
|
|
1180
|
+
# Handle Python objects
|
|
1124
1181
|
return type(obj).__name__
|
|
1125
1182
|
|
|
1126
1183
|
def builtin_isavailable(self, name_or_obj: Any) -> bool:
|
|
@@ -3,10 +3,10 @@ CSSL Built-in Functions - Complete Type Stubs & Documentation
|
|
|
3
3
|
==============================================================
|
|
4
4
|
|
|
5
5
|
This file provides comprehensive type hints and documentation for all CSSL
|
|
6
|
-
built-in functions and container types. All are available in
|
|
7
|
-
without imports.
|
|
6
|
+
built-in functions, data types, and container types. All are available in
|
|
7
|
+
CSSL scripts without imports.
|
|
8
8
|
|
|
9
|
-
Total: 200+ functions + 9 container classes across
|
|
9
|
+
Total: 200+ functions + 9 container classes + 10 data types across 20 categories.
|
|
10
10
|
|
|
11
11
|
Categories:
|
|
12
12
|
- Output Functions (7)
|
|
@@ -27,6 +27,7 @@ Categories:
|
|
|
27
27
|
- Container Classes (9) - stack<T>, vector<T>, array<T>, map<K,V>, etc.
|
|
28
28
|
- Function Keywords (10)
|
|
29
29
|
- Classes & OOP
|
|
30
|
+
- Data Types (10) - int, float, string, bool, dynamic, var, list, dict, void, null
|
|
30
31
|
- Special Syntax Reference
|
|
31
32
|
|
|
32
33
|
Container Types with Methods (use lowercase names for quick lookup):
|
|
@@ -42,6 +43,20 @@ Container Types with Methods (use lowercase names for quick lookup):
|
|
|
42
43
|
|
|
43
44
|
Type "vector." to see all available methods with documentation.
|
|
44
45
|
|
|
46
|
+
Data Types (use type aliases for quick lookup):
|
|
47
|
+
- int_t: int - whole numbers
|
|
48
|
+
- float_t: float - decimal numbers
|
|
49
|
+
- string_t: string - text with interpolation
|
|
50
|
+
- bool_t: bool - true/false values
|
|
51
|
+
- dynamic_t: dynamic - any type (auto-typed)
|
|
52
|
+
- var_t: var - type inference
|
|
53
|
+
- list_t: list - ordered collection
|
|
54
|
+
- dict_t: dict - key-value pairs
|
|
55
|
+
- void_t: void - no return value
|
|
56
|
+
- null_t: null/None - absence of value
|
|
57
|
+
|
|
58
|
+
Type "int_t" or "DataTypes." to see data type documentation.
|
|
59
|
+
|
|
45
60
|
Usage from Python:
|
|
46
61
|
from includecpp import CSSL
|
|
47
62
|
|
|
@@ -4151,6 +4166,365 @@ class SpecialSyntax:
|
|
|
4151
4166
|
"""
|
|
4152
4167
|
...
|
|
4153
4168
|
|
|
4169
|
+
# =============================================================================
|
|
4170
|
+
# DATA TYPES
|
|
4171
|
+
# =============================================================================
|
|
4172
|
+
|
|
4173
|
+
class DataTypes:
|
|
4174
|
+
"""
|
|
4175
|
+
CSSL Data Types Reference
|
|
4176
|
+
|
|
4177
|
+
CSSL supports various primitive and compound data types for variable
|
|
4178
|
+
declarations and function parameters/returns.
|
|
4179
|
+
"""
|
|
4180
|
+
|
|
4181
|
+
def int_type(self) -> None:
|
|
4182
|
+
"""Integer type - whole numbers.
|
|
4183
|
+
|
|
4184
|
+
Range: Platform-dependent (typically 64-bit signed integer)
|
|
4185
|
+
|
|
4186
|
+
Example:
|
|
4187
|
+
int x = 42;
|
|
4188
|
+
int negative = -100;
|
|
4189
|
+
int hex = 0xFF; // Hexadecimal
|
|
4190
|
+
int binary = 0b1010; // Binary (if supported)
|
|
4191
|
+
|
|
4192
|
+
// Arithmetic
|
|
4193
|
+
int sum = x + 10;
|
|
4194
|
+
int product = x * 2;
|
|
4195
|
+
int quotient = x / 5;
|
|
4196
|
+
int remainder = x % 7;
|
|
4197
|
+
|
|
4198
|
+
// Increment/decrement
|
|
4199
|
+
x++;
|
|
4200
|
+
x--;
|
|
4201
|
+
"""
|
|
4202
|
+
...
|
|
4203
|
+
|
|
4204
|
+
def float_type(self) -> None:
|
|
4205
|
+
"""Floating-point type - decimal numbers.
|
|
4206
|
+
|
|
4207
|
+
Supports standard IEEE 754 double precision.
|
|
4208
|
+
|
|
4209
|
+
Example:
|
|
4210
|
+
float pi = 3.14159;
|
|
4211
|
+
float negative = -2.5;
|
|
4212
|
+
float scientific = 1.5e10; // 1.5 × 10^10
|
|
4213
|
+
|
|
4214
|
+
// Arithmetic
|
|
4215
|
+
float result = pi * 2.0;
|
|
4216
|
+
float divided = 10.0 / 3.0; // 3.333...
|
|
4217
|
+
|
|
4218
|
+
// Conversion
|
|
4219
|
+
int rounded = int(pi); // 3
|
|
4220
|
+
float fromInt = float(42); // 42.0
|
|
4221
|
+
"""
|
|
4222
|
+
...
|
|
4223
|
+
|
|
4224
|
+
def string_type(self) -> None:
|
|
4225
|
+
"""String type - text sequences.
|
|
4226
|
+
|
|
4227
|
+
Supports single quotes, double quotes, and string interpolation.
|
|
4228
|
+
|
|
4229
|
+
Example:
|
|
4230
|
+
string name = "Alice";
|
|
4231
|
+
string alt = 'Bob'; // Single quotes work too
|
|
4232
|
+
|
|
4233
|
+
// String interpolation (f-string style)
|
|
4234
|
+
string greeting = "Hello {name}!"; // "Hello Alice!"
|
|
4235
|
+
string altStyle = "Hello <name>!"; // Also works
|
|
4236
|
+
|
|
4237
|
+
// Concatenation
|
|
4238
|
+
string full = "Hello" + " " + "World";
|
|
4239
|
+
string repeated = "ab" * 3; // "ababab"
|
|
4240
|
+
|
|
4241
|
+
// Methods/functions
|
|
4242
|
+
int length = len(name); // 5
|
|
4243
|
+
string upper = upper(name); // "ALICE"
|
|
4244
|
+
bool hasA = contains(name, "A"); // true
|
|
4245
|
+
|
|
4246
|
+
// Indexing
|
|
4247
|
+
string first = name[0]; // "A"
|
|
4248
|
+
string slice = substr(name, 0, 3); // "Ali"
|
|
4249
|
+
"""
|
|
4250
|
+
...
|
|
4251
|
+
|
|
4252
|
+
def bool_type(self) -> None:
|
|
4253
|
+
"""Boolean type - true/false values.
|
|
4254
|
+
|
|
4255
|
+
Example:
|
|
4256
|
+
bool isActive = true;
|
|
4257
|
+
bool isComplete = false;
|
|
4258
|
+
|
|
4259
|
+
// Logical operations
|
|
4260
|
+
bool and_result = true && false; // false
|
|
4261
|
+
bool or_result = true || false; // true
|
|
4262
|
+
bool not_result = !true; // false
|
|
4263
|
+
|
|
4264
|
+
// Comparisons return bool
|
|
4265
|
+
bool equal = (5 == 5); // true
|
|
4266
|
+
bool greater = (10 > 5); // true
|
|
4267
|
+
bool notEqual = (3 != 4); // true
|
|
4268
|
+
|
|
4269
|
+
// In conditions
|
|
4270
|
+
if (isActive) {
|
|
4271
|
+
printl("Active!");
|
|
4272
|
+
}
|
|
4273
|
+
|
|
4274
|
+
// Ternary operator
|
|
4275
|
+
string status = isActive ? "ON" : "OFF";
|
|
4276
|
+
"""
|
|
4277
|
+
...
|
|
4278
|
+
|
|
4279
|
+
def dynamic_type(self) -> None:
|
|
4280
|
+
"""Dynamic type - auto-typed, can hold any value.
|
|
4281
|
+
|
|
4282
|
+
Similar to Python's duck typing. Type is determined at assignment.
|
|
4283
|
+
Can change type when reassigned.
|
|
4284
|
+
|
|
4285
|
+
Example:
|
|
4286
|
+
dynamic x = 42; // Currently int
|
|
4287
|
+
printl(typeof(x)); // "int"
|
|
4288
|
+
|
|
4289
|
+
x = "hello"; // Now string
|
|
4290
|
+
printl(typeof(x)); // "str"
|
|
4291
|
+
|
|
4292
|
+
x = [1, 2, 3]; // Now list
|
|
4293
|
+
printl(typeof(x)); // "list"
|
|
4294
|
+
|
|
4295
|
+
// Useful for flexible functions
|
|
4296
|
+
dynamic result = getData(); // Unknown return type
|
|
4297
|
+
|
|
4298
|
+
// Type checking
|
|
4299
|
+
if (isint(x)) {
|
|
4300
|
+
printl("It's a number!");
|
|
4301
|
+
}
|
|
4302
|
+
"""
|
|
4303
|
+
...
|
|
4304
|
+
|
|
4305
|
+
def var_type(self) -> None:
|
|
4306
|
+
"""Var type - type inference from assigned value.
|
|
4307
|
+
|
|
4308
|
+
Type is inferred at assignment and remains fixed.
|
|
4309
|
+
More constrained than 'dynamic'.
|
|
4310
|
+
|
|
4311
|
+
Example:
|
|
4312
|
+
var count = 100; // Inferred as int
|
|
4313
|
+
var name = "Bob"; // Inferred as string
|
|
4314
|
+
var items = [1, 2, 3]; // Inferred as list
|
|
4315
|
+
|
|
4316
|
+
// Type is determined by right-hand side
|
|
4317
|
+
var result = calculate(); // Type of function return
|
|
4318
|
+
"""
|
|
4319
|
+
...
|
|
4320
|
+
|
|
4321
|
+
def list_type(self) -> None:
|
|
4322
|
+
"""List type - ordered collection of values.
|
|
4323
|
+
|
|
4324
|
+
Can contain mixed types. Zero-indexed.
|
|
4325
|
+
|
|
4326
|
+
Example:
|
|
4327
|
+
// Declaration
|
|
4328
|
+
list items = [1, 2, 3, 4, 5];
|
|
4329
|
+
list mixed = ["hello", 42, true, 3.14];
|
|
4330
|
+
list empty = [];
|
|
4331
|
+
|
|
4332
|
+
// Typed list (generic)
|
|
4333
|
+
list<int> numbers = [1, 2, 3];
|
|
4334
|
+
list<string> names = ["Alice", "Bob"];
|
|
4335
|
+
|
|
4336
|
+
// Access
|
|
4337
|
+
int first = items[0]; // 1
|
|
4338
|
+
int last = items[len(items)-1]; // 5
|
|
4339
|
+
|
|
4340
|
+
// Modification
|
|
4341
|
+
push(items, 6); // Add to end
|
|
4342
|
+
pop(items); // Remove from end
|
|
4343
|
+
items[0] = 100; // Set by index
|
|
4344
|
+
|
|
4345
|
+
// Iteration
|
|
4346
|
+
foreach (item in items) {
|
|
4347
|
+
printl(item);
|
|
4348
|
+
}
|
|
4349
|
+
|
|
4350
|
+
// Operations
|
|
4351
|
+
int length = len(items);
|
|
4352
|
+
bool hasValue = contains(items, 3);
|
|
4353
|
+
list sorted = sort(items);
|
|
4354
|
+
list reversed = reverse(items);
|
|
4355
|
+
list slice = slice(items, 1, 3);
|
|
4356
|
+
"""
|
|
4357
|
+
...
|
|
4358
|
+
|
|
4359
|
+
def dict_type(self) -> None:
|
|
4360
|
+
"""Dictionary type - key-value pairs.
|
|
4361
|
+
|
|
4362
|
+
Keys are typically strings or integers. Values can be any type.
|
|
4363
|
+
Also available as 'dictionary' keyword.
|
|
4364
|
+
|
|
4365
|
+
Example:
|
|
4366
|
+
// Declaration
|
|
4367
|
+
dict person = {
|
|
4368
|
+
"name": "Alice",
|
|
4369
|
+
"age": 30,
|
|
4370
|
+
"active": true
|
|
4371
|
+
};
|
|
4372
|
+
|
|
4373
|
+
// Access
|
|
4374
|
+
string name = person["name"]; // "Alice"
|
|
4375
|
+
int age = person["age"]; // 30
|
|
4376
|
+
|
|
4377
|
+
// Modification
|
|
4378
|
+
person["email"] = "alice@example.com";
|
|
4379
|
+
delkey(person, "active");
|
|
4380
|
+
|
|
4381
|
+
// Methods
|
|
4382
|
+
list allKeys = keys(person); // ["name", "age", "email"]
|
|
4383
|
+
list allValues = values(person); // ["Alice", 30, "alice@..."]
|
|
4384
|
+
bool hasName = haskey(person, "name"); // true
|
|
4385
|
+
|
|
4386
|
+
// Iteration
|
|
4387
|
+
foreach (key in keys(person)) {
|
|
4388
|
+
printl(key + ": " + person[key]);
|
|
4389
|
+
}
|
|
4390
|
+
|
|
4391
|
+
// Safe access with default
|
|
4392
|
+
string value = getkey(person, "missing", "default");
|
|
4393
|
+
|
|
4394
|
+
// Typed dictionary
|
|
4395
|
+
dictionary<string> data;
|
|
4396
|
+
data["key"] = "value";
|
|
4397
|
+
"""
|
|
4398
|
+
...
|
|
4399
|
+
|
|
4400
|
+
def void_type(self) -> None:
|
|
4401
|
+
"""Void type - no return value.
|
|
4402
|
+
|
|
4403
|
+
Used for function declarations that don't return anything.
|
|
4404
|
+
|
|
4405
|
+
Example:
|
|
4406
|
+
void sayHello() {
|
|
4407
|
+
printl("Hello!");
|
|
4408
|
+
// No return statement needed
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4411
|
+
void processData(int value) {
|
|
4412
|
+
// Do something with value
|
|
4413
|
+
// Returns nothing
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4416
|
+
// Calling
|
|
4417
|
+
sayHello();
|
|
4418
|
+
"""
|
|
4419
|
+
...
|
|
4420
|
+
|
|
4421
|
+
def null_type(self) -> None:
|
|
4422
|
+
"""Null type - absence of value.
|
|
4423
|
+
|
|
4424
|
+
Represents no value or undefined state.
|
|
4425
|
+
Can be used with 'null' or 'None'.
|
|
4426
|
+
|
|
4427
|
+
Example:
|
|
4428
|
+
dynamic x = null;
|
|
4429
|
+
var y = None; // Same as null
|
|
4430
|
+
|
|
4431
|
+
// Null checking
|
|
4432
|
+
if (x == null) {
|
|
4433
|
+
printl("No value");
|
|
4434
|
+
}
|
|
4435
|
+
|
|
4436
|
+
if (isnull(x)) {
|
|
4437
|
+
printl("x is null");
|
|
4438
|
+
}
|
|
4439
|
+
|
|
4440
|
+
// Default value pattern
|
|
4441
|
+
string result = value != null ? value : "default";
|
|
4442
|
+
"""
|
|
4443
|
+
...
|
|
4444
|
+
|
|
4445
|
+
|
|
4446
|
+
# Data type aliases for direct lookup
|
|
4447
|
+
int_t = DataTypes.int_type
|
|
4448
|
+
"""int - Integer type for whole numbers.
|
|
4449
|
+
|
|
4450
|
+
Example:
|
|
4451
|
+
int count = 42;
|
|
4452
|
+
int negative = -100;
|
|
4453
|
+
count++;
|
|
4454
|
+
"""
|
|
4455
|
+
|
|
4456
|
+
float_t = DataTypes.float_type
|
|
4457
|
+
"""float - Floating-point type for decimal numbers.
|
|
4458
|
+
|
|
4459
|
+
Example:
|
|
4460
|
+
float pi = 3.14159;
|
|
4461
|
+
float result = 10.0 / 3.0;
|
|
4462
|
+
"""
|
|
4463
|
+
|
|
4464
|
+
string_t = DataTypes.string_type
|
|
4465
|
+
"""string - Text type with interpolation support.
|
|
4466
|
+
|
|
4467
|
+
Example:
|
|
4468
|
+
string name = "Alice";
|
|
4469
|
+
string msg = "Hello {name}!";
|
|
4470
|
+
"""
|
|
4471
|
+
|
|
4472
|
+
bool_t = DataTypes.bool_type
|
|
4473
|
+
"""bool - Boolean true/false type.
|
|
4474
|
+
|
|
4475
|
+
Example:
|
|
4476
|
+
bool active = true;
|
|
4477
|
+
bool done = false;
|
|
4478
|
+
"""
|
|
4479
|
+
|
|
4480
|
+
dynamic_t = DataTypes.dynamic_type
|
|
4481
|
+
"""dynamic - Auto-typed, can hold any value type.
|
|
4482
|
+
|
|
4483
|
+
Example:
|
|
4484
|
+
dynamic x = 42;
|
|
4485
|
+
x = "now a string";
|
|
4486
|
+
"""
|
|
4487
|
+
|
|
4488
|
+
var_t = DataTypes.var_type
|
|
4489
|
+
"""var - Type inference from assigned value.
|
|
4490
|
+
|
|
4491
|
+
Example:
|
|
4492
|
+
var count = 100; // Inferred as int
|
|
4493
|
+
var name = "Bob"; // Inferred as string
|
|
4494
|
+
"""
|
|
4495
|
+
|
|
4496
|
+
list_t = DataTypes.list_type
|
|
4497
|
+
"""list - Ordered collection of values.
|
|
4498
|
+
|
|
4499
|
+
Example:
|
|
4500
|
+
list items = [1, 2, 3];
|
|
4501
|
+
list<string> names = ["Alice", "Bob"];
|
|
4502
|
+
"""
|
|
4503
|
+
|
|
4504
|
+
dict_t = DataTypes.dict_type
|
|
4505
|
+
"""dict - Key-value pair collection.
|
|
4506
|
+
|
|
4507
|
+
Example:
|
|
4508
|
+
dict data = {"name": "Alice", "age": 30};
|
|
4509
|
+
dict<string> config;
|
|
4510
|
+
"""
|
|
4511
|
+
|
|
4512
|
+
void_t = DataTypes.void_type
|
|
4513
|
+
"""void - No return value (function declaration).
|
|
4514
|
+
|
|
4515
|
+
Example:
|
|
4516
|
+
void sayHello() { printl("Hello!"); }
|
|
4517
|
+
"""
|
|
4518
|
+
|
|
4519
|
+
null_t = DataTypes.null_type
|
|
4520
|
+
"""null/None - Absence of value.
|
|
4521
|
+
|
|
4522
|
+
Example:
|
|
4523
|
+
dynamic x = null;
|
|
4524
|
+
if (isnull(x)) { printl("No value"); }
|
|
4525
|
+
"""
|
|
4526
|
+
|
|
4527
|
+
|
|
4154
4528
|
# =============================================================================
|
|
4155
4529
|
# EXPORTS
|
|
4156
4530
|
# =============================================================================
|
|
@@ -4215,4 +4589,7 @@ __all__ = [
|
|
|
4215
4589
|
"stack", "vector", "array", "map", "datastruct", "iterator", "shuffled", "combo", "dataspace",
|
|
4216
4590
|
# Syntax Reference Classes
|
|
4217
4591
|
"FunctionKeywords", "ClassSyntax", "SpecialSyntax",
|
|
4592
|
+
# Data Types Reference
|
|
4593
|
+
"DataTypes", "int_t", "float_t", "string_t", "bool_t", "dynamic_t",
|
|
4594
|
+
"var_t", "list_t", "dict_t", "void_t", "null_t",
|
|
4218
4595
|
]
|
|
@@ -1499,7 +1499,10 @@ class CSSLInstance:
|
|
|
1499
1499
|
object.__setattr__(self, name, value)
|
|
1500
1500
|
|
|
1501
1501
|
def __repr__(self):
|
|
1502
|
-
return f"<
|
|
1502
|
+
return f"<{self._class.name} instance at 0x{id(self):x}>"
|
|
1503
|
+
|
|
1504
|
+
def __str__(self):
|
|
1505
|
+
return f"<{self._class.name} instance at 0x{id(self):x}>"
|
|
1503
1506
|
|
|
1504
1507
|
|
|
1505
1508
|
__all__ = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
includecpp/__init__.py,sha256=
|
|
1
|
+
includecpp/__init__.py,sha256=p-BfexUrjPnyioKStMnBtr53Hgk1C3MmICE1Q-uv14Y,1673
|
|
2
2
|
includecpp/__init__.pyi,sha256=uSDYlbqd2TinmrdepmE_zvN25jd3Co2cgyPzXgDpopM,7193
|
|
3
3
|
includecpp/__main__.py,sha256=d6QK0PkvUe1ENofpmHRAg3bwNbZr8PiRscfI3-WRfVg,72
|
|
4
4
|
includecpp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -21,14 +21,14 @@ includecpp/core/project_ui.py,sha256=la2EQZKmUkJGuJxnbs09hH1ZhBh9bfndo6okzZsk2dQ
|
|
|
21
21
|
includecpp/core/settings_ui.py,sha256=B2SlwgdplF2KiBk5UYf2l8Jjifjd0F-FmBP0DPsVCEQ,11798
|
|
22
22
|
includecpp/core/cssl/CSSL_DOCUMENTATION.md,sha256=47sUPO-FMq_8_CrJBZFoFBgSO3gSi5zoB1Xp7oeifho,40773
|
|
23
23
|
includecpp/core/cssl/__init__.py,sha256=bMG8UO4eMfHEsyqp-wkiMLu-KERNcKUQF_s8yL8PLKU,1810
|
|
24
|
-
includecpp/core/cssl/cssl_builtins.py,sha256=
|
|
25
|
-
includecpp/core/cssl/cssl_builtins.pyi,sha256=
|
|
24
|
+
includecpp/core/cssl/cssl_builtins.py,sha256=MkVdSew0jZj3_DH5fwyT5Q3hdh_wV_9JuLbnMvTVyXU,87007
|
|
25
|
+
includecpp/core/cssl/cssl_builtins.pyi,sha256=MMy3NGUBGn8-4u4eUgf8wyENNMSmcFaiAd-icQbdbQE,124996
|
|
26
26
|
includecpp/core/cssl/cssl_events.py,sha256=nupIcXW_Vjdud7zCU6hdwkQRQ0MujlPM7Tk2u7eDAiY,21013
|
|
27
27
|
includecpp/core/cssl/cssl_modules.py,sha256=cUg0-zdymMnWWTsA_BUrW5dx4R04dHpKcUhm-Wfiwwo,103006
|
|
28
28
|
includecpp/core/cssl/cssl_parser.py,sha256=t1C0fplyJz_ZqJOlfx5fG2GZZtCMJj4fCIgWzf-1JAY,113147
|
|
29
29
|
includecpp/core/cssl/cssl_runtime.py,sha256=3b14wEWvLpFDVA0r0pyNqy02l7s9FTdXQd61BdpPlZg,131780
|
|
30
30
|
includecpp/core/cssl/cssl_syntax.py,sha256=bgo3NFehoPTQa5dqwNd_CstkVGVCNYAXbGYUcu5BEN0,16982
|
|
31
|
-
includecpp/core/cssl/cssl_types.py,sha256=
|
|
31
|
+
includecpp/core/cssl/cssl_types.py,sha256=ebgZrrddhmTRK8vQ3dNWVH15Z4rMqEx1sSmozhnJyQA,48292
|
|
32
32
|
includecpp/generator/__init__.py,sha256=Rsy41bwimaEloD3gDRR_znPfIJzIsCFuWZgCTJBLJlc,62
|
|
33
33
|
includecpp/generator/parser.cpp,sha256=hbhHdtFH65rzp6prnARN9pNFF_ssr0NseVVcxq0fJh4,76833
|
|
34
34
|
includecpp/generator/parser.h,sha256=EDm0b-pEesIIIQQ2PvH5h2qwlqJU9BH8SiMV7MWbsTo,11073
|
|
@@ -43,9 +43,9 @@ includecpp/vscode/cssl/images/cssl.png,sha256=BxAGsnfS0ZzzCvqV6Zb1OAJAZpDUoXlR86
|
|
|
43
43
|
includecpp/vscode/cssl/images/cssl_pl.png,sha256=z4WMk7g6YCTbUUbSFk343BO6yi_OmNEVYkRenWGydwM,799
|
|
44
44
|
includecpp/vscode/cssl/snippets/cssl.snippets.json,sha256=l4SCEPR3CsPxA8HIVLKYY__I979TfKzYWtH1KYIsboo,33062
|
|
45
45
|
includecpp/vscode/cssl/syntaxes/cssl.tmLanguage.json,sha256=XKRLBOHlCqDDnGPvmNHDQPsIMR1UD9PBaJIlgZOiPqM,21173
|
|
46
|
-
includecpp-3.7.
|
|
47
|
-
includecpp-3.7.
|
|
48
|
-
includecpp-3.7.
|
|
49
|
-
includecpp-3.7.
|
|
50
|
-
includecpp-3.7.
|
|
51
|
-
includecpp-3.7.
|
|
46
|
+
includecpp-3.7.17.dist-info/licenses/LICENSE,sha256=fWCsGGsiWZir0UzDd20Hh-3wtRyk1zqUntvtVuAWhvc,1093
|
|
47
|
+
includecpp-3.7.17.dist-info/METADATA,sha256=TtQgfW3QeImhRmNz4fDBqBIX6X_g6Md9i5r2xJHyViA,32122
|
|
48
|
+
includecpp-3.7.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
49
|
+
includecpp-3.7.17.dist-info/entry_points.txt,sha256=6A5Mif9gi0139Bf03W5plAb3wnAgbNaEVe1HJoGE-2o,59
|
|
50
|
+
includecpp-3.7.17.dist-info/top_level.txt,sha256=RFUaR1KG-M6mCYwP6w4ydP5Cgc8yNbP78jxGAvyjMa8,11
|
|
51
|
+
includecpp-3.7.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|