aboutsummaryrefslogtreecommitdiffstats
path: root/examples/steps.aup
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-18 16:43:57 +0100
committereunhhu <[email protected]>2026-10-18 16:43:57 +0100
commit82925e53aedc3c63e9f7dbf53b88eacfbd86c06e (patch)
tree29849b90693da32cb105b8f55567ad69756d226b /examples/steps.aup
parent7e9fb3b2368634b9cfe4758e7e6b060a5a6fd523 (diff)
downloadaup-82925e53aedc3c63e9f7dbf53b88eacfbd86c06e.tar.gz
aup-82925e53aedc3c63e9f7dbf53b88eacfbd86c06e.zip
Fns that call themselves, blocks, several values, records' values and characters (Pure 027's stage 2c): a fn with a block (statements, return a, b; return alone gives nothing) or one a cycle of calls goes through runs as Pure's function (CALL), once for each kinds of arguments it is called with, in code of its own after the handlers' and views'; its parameters held by name as it begins, its let's lists, held values and registers each call's own (Pure's); -> types where it calls itself before a return says what it gives, a return's values wanted as those types; f(x) as a statement where it gives nothing, let a, b = f(x) and a, b = f(x) (lets and states) where it gives several; a view, a count, sum, max or min calls none; records' and variants' values: R { ... }, V.case(x), V.case and calls giving one onto the stack field by field, held by a name (name.field lets), passed and given back, matched (a case's value named, read only), appended (a call's value held first), an item and a record under an item's field passed as values (a function has its own lists), a list a value holds walked through a register, a list in a local (Pure's local type 4), R { ... } written where a let, an assignment, a return or an argument takes a value; never-run lines after a return or a break refused, no jump past an else whose then stops, the last arm of a match that names every case taken without asking; for ch in t: a text's characters as code points (a let's, a parameter's, a state's, a record's field, a message's text field), char(n); examples/json_tree.aup by recursive descent and a depth-first walk; 13 diagnostics, 2 accepted forms, a functions test against Python (40 random trees built and summed recursively, deepest and leaves as two values, 60 random texts' characters, a call without end failing as memory with nothing changed); the 2b compiler's modules for 49 sources byte for byte the same (json_tree.aup's match aside); three diagnostics' wording follows records being values
Diffstat (limited to 'examples/steps.aup')
0 files changed, 0 insertions, 0 deletions