Expressions
Last validated: 2026-05-14
This page defines expression syntax used in field defaults and step inputs.
Literal Values
"hello" -- text
123 -- integer
3.14 -- float
true -- boolean
false -- boolean
null -- nullTriple-quoted strings are supported:
"""
Multi-line content
with quotes "inside"
"""References And Interpolation
Reference variables by name:
project
report.text
items[0]Interpolate with {...} inside strings:
"Deploying {project} to {env_name}"
"Author: {report.author}"Current interpolation parsing is intentionally simple: use variable names and dotted field paths ({name}, {obj.field}) for predictable behavior. For more complex computation, use let first, then interpolate the bound variable.
Access Operators
Field Access
obj.fieldSafe Access
obj?.fieldDefault Fallback
obj.field ?? "unknown"
obj.field ?? (fallback_map[region] ?? "unknown")Index Access
arr[0]
map_like[key]Function And Method Calls
count(items)
starts_with(content_type, "image/")
text.trim()
report.text.contains("TODO")Method syntax is transformed by compiler/runtime into method-call semantics.
Lambda Expressions
Single-parameter lambda:
item => item.score > 0.8Multi-parameter lambda:
(a, b) => a.score > b.scoreTypical use with collection helpers:
map(results, r => r.title)
filter(results, r => r.score > 0.7)Special env(...) Expression
Scriptum parser supports env lookup expression:
env(LLM_API_KEY)
env("LLM_MODEL", "gpt-4o")Object And Array Literals
Array literal:
["a", "b", "c"]
[1, 2, 3]Object literal (: and = forms are accepted):
{ provider: "public", tier: "gold" }
{ provider = "public", tier = "gold" }Operators
Arithmetic
+-*/%
Comparison
==!=><>=<=
Logical
andornot(also!)
Precedence (Low To High)
orand- comparisons (
==,!=,>,<,>=,<=) - additive (
+,-) - multiplicative (
*,/,%) - unary (
not,!, unary-) - postfix (
.,?.,??, call(...), index[...]) - primary (literal/reference/grouped)
Practical Notes
- Parenthesize complex expressions for readability and stability.
- Avoid chaining multiple comparisons in one expression.
??accepts a primary expression on the right side; use parentheses for complex fallback logic.- Prefer explicit field names over deep chained access when nullability is uncertain.