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
{{ message }}
Repository navigation
Commit d697a81
Browse filesBrowse the repository at this point in the historyBrowse files
hzq
committed
Add bounded array subscripts to OAA-Lang
Evaluate computed indices against own array elements without copying the source array. Preserve normal expression limits and dependency checks, and advertise the new syntax to clients.
Copy file name to clipboardExpand all lines: docs/language.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -314,6 +314,7 @@ agent "agent/step-block" {
314
314
- A string containing `{{...}}` is a template, for example `"{{$input.prefix}}:{{doc.title}}"`; to write ordinary text that contains `{{`, use `literal("...")` (it accepts only a string).
315
315
- An explicit JSON descriptor `{ "$ref": "doc#/text", "$default": "none" }` is kept as is and is no longer parsed as shorthand.
316
316
- In `$(input.limit ?? 10)`, use 10 only when the field is missing or null. The operator returns the value itself, preserving 0, false and empty strings, and does not evaluate an unused default. Both operands are still checked at compile time. It binds below `||` and above `? :`; parenthesize mixed expressions for readability. Older runtimes need an upgrade before using this syntax.
317
+
-`$(input.rows[input.pick] ?? "missing")` selects one array element using a computed zero-based index. Only non-negative safe integers are accepted; an invalid or out-of-range index, a missing element, or a non-array target yields `null`. It does not look up object properties or coerce numeric strings. Subscripts bind before arithmetic and can be chained for nested arrays. Require `graph-array-index-v1` in `GET /health` and upgrade any workers that install such bundles.
0 commit comments