You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Identifiers must start with a letter (a-z, A-Z) or underscore (_), followed by any combination of letters, digits (0-9), or underscores. They are case-sensitive.
Literals
ProXPL supports the following literals:
Numbers: Decimal integers (42) and floating-point numbers (3.14).
Strings: Text enclosed in double quotes ("Hello"). Supports escape sequences like \n, \t, \".
Booleans: true and false.
Null: null.
Comments
Single-line: Starts with // and extends to the end of the line.
Multi-line: Enclosed between /* and */.
2. Data Types
Primitive Types
Type
Description
Example
Null
Represents the absence of a value.
null
Boolean
Logical true or false.
true, false
Number
Double-precision floating point (Ints & Floats).
42, 3.14
Complex & Collection Types
Type
Description
Example
String
Immutable UTF-8 encoded text.
"Hello"
List
Ordered, mutable collection.
[1, 2, 3]
Dict
Key-value hash map.
{"key": "val"}
Set
Unique, unordered collection.
Set([1, 2])
Bytes
Raw byte sequence.
to_bytes("ABC")
Tensor
Multi-dimensional array for AI/Math.
[[1,2], [3,4]]
Callable & System Types
Type
Description
Function
User-defined callable block of code.
NativeFunc
Built-in VM function.
Class
A template for creating objects.
Instance
An object created from a class.
Module
A loaded module object.
Error
Exception object for error handling.
3. Operators
Arithmetic
Operator
Description
+
Addition / Concatenation
-
Subtraction
*
Multiplication
/
Division
%
Modulus
**
Exponentiation
@
Matrix Multiplication (Tensors)
Comparison
Operator
Description
==
Equal to
!=
Not equal to
<
Less than
>
Greater than
<=
Less than or equal to
>=
Greater than or equal to
Logical
Operator
Description
&&
Logical AND
||
Logical OR
!
Logical NOT
Bitwise
Operator
Description
Example
&
Bitwise AND
5 & 3
|
Bitwise OR
5 | 3
^
Bitwise XOR
5 ^ 3
~
Bitwise NOT
~5
<<
Left shift
5 << 1
>>
Right shift
5 >> 1
Assignment
Operator
Description
=
Assign
+=, -=, *=, /=, %=, **=
Compound Arithmetic
&=, |=, ^=, <<=, >>=
Compound Bitwise
Special Operators
Operator
Description
Usage
.
Member access
obj.prop
?.
Optional chaining
obj?.prop
??
Null coalescing
val ?? default
? :
Ternary operator
cond ? true : false
..
Range operator
1..10
=>
Arrow function
(x) => x*2
++ / --
Increment/Decrement
x++, --x
Precedence (High to Low)
()[].?.
Postfix ++--
Unary !~++---
**
*/%
+-
<<>>
Comparison <<=>>=
Equality ==!=
& (Bitwise AND)
^ (Bitwise XOR)
| (Bitwise OR)
&& (Logical AND)
|| (Logical OR)
?? (Null Coalesce)
Ternary ? :
Assignment = etc.
4. Statements & Control Flow
Variable Declaration
letx=10;// MutableconstPI=3.14;// Immutable
let count: int=0;// Optional type annotation