This commit is contained in:
2026-08-18 14:07:33 +03:00
parent 0fa388abeb
commit f4d089e5e5
21 changed files with 913 additions and 521 deletions
+2 -1
View File
@@ -62,7 +62,8 @@ let result = vm.execute()?; // Returns last expression's value
The dexpr language supports:
- If/else conditionals with `if ... then ... else ... end`
- String methods (e.g., `.upper()`, `.lower()`, `.trim()`, `.trimStart()`, `.trimEnd()`, `.split()`, `.replace()`, `.contains()`, `.startsWith()`, `.endsWith()`, `.length`, `.charAt()`, `.substring()`)
- Arithmetic (`+`, `-`, `*`, `/`, `%`, `**`), comparison, and logical operators
- Arithmetic (`+`, `-`, `*`, `/`, `%`, `**`), comparison, and logical operators. `==`/`!=` work on all types (structural, different types → `false`); `<`/`<=`/`>`/`>=` work on Number and String (lexicographic)
- `null` literal (`x == null`)
- `in` operator for membership testing (`"finans" in categories`, `5 in numbers`, `"hello" in "hello world"`, `"key" in obj`)
- Compound assignments (`+=`, `-=`, `*=`, `/=`, `%=`)
- Built-in `log()` function for output and `rand(min, max)` for random integers