← SPL reference

Data types & literals

Runtime values map to Python types inside the interpreter. Use type.* helpers to branch on kinds.

Numbers

Integers and floats from numeric literals. Many math.* calls normalize results (e.g. int when all operands are integral).

Booleans

Literals true and false become 1 and 0. Control flow and logic treat non-zero as true.

Strings

Double-quoted, with escapes processed by the lexer. Use string.* for concat, case, padding, search/replace, and binary helpers.

Lists

[a, b, c] builds a Python list. Create named lists with list.createList([...], name). Mutate with list.append, list.change, etc.

Hashes (dicts)

{ key: value } — keys must be hashable after evaluation. Bind with hash.createHashTable({...}, name). Empty {} is an empty hash literal in the parser when followed by comma/colon rules as in the grammar (see hash vs set below).

Sets

{ a, b, c } — comma-separated without colons is a set literal (deduplicated). set.createSet binds to a variable; use set.append, remove, removeByIndex.

Tuples

() empty tuple, or (a, b) with commas inside parentheses. Bind with tuple.createTuple((...), name); index with tuple.get.

Null

The name null is pre-bound in global scope. Use for “missing” results, e.g. return.boolean(null).