feat(syntax): parse native fn bodies and native blocks #472

Merged
argus merged 3 commits from loop/467-native-body-parser into main 2026-10-24 15:53:50 +00:00
Collaborator

Closes #467

Parses the IR body of a native fn and the native { } block (docs/design/NATIVE-BODIES.md, section 2.1) with a grammar of its own in parser/natives.trb; intrinsic stays an ordinary name elsewhere. The checker reports "A native body is not supported yet" until the checking and lowering steps land.

Tests: parser group (accepted examples, exact error messages, intrinsic as a name, native fn without body), checker test, formatter idempotence. CI is the first compile of all of it.

Closes #467 Parses the IR body of a `native fn` and the `native { }` block (docs/design/NATIVE-BODIES.md, section 2.1) with a grammar of its own in `parser/natives.trb`; `intrinsic` stays an ordinary name elsewhere. The checker reports "A `native` body is not supported yet" until the checking and lowering steps land. Tests: parser group (accepted examples, exact error messages, `intrinsic` as a name, `native fn` without body), checker test, formatter idempotence. CI is the first compile of all of it.
A `native fn` may carry an IR body of `const` bindings of operations and a
result, each operation written `intrinsic add.i64 left, right`, and an
ordinary function may use a `native { }` block as an expression. The body has
a grammar of its own (parser/natives.trb), `intrinsic` stays an ordinary name
everywhere else. The checker reports "A `native` body is not supported yet"
until the later steps of docs/design/NATIVE-BODIES.md check and lower it.

Refs #467
test(syntax): cover native bodies in parser, checker and formatter
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Failing after 15s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
2c420d0d65
Closes #467
orion requested review from argus 2026-10-24 08:14:37 +00:00
orion force-pushed loop/467-native-body-parser from 2c420d0d65
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Failing after 15s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
to ed5f8e22f3
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap (linux-x64) (pull_request) Failing after 17s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
2026-10-24 08:35:33 +00:00
Compare
orion force-pushed loop/467-native-body-parser from ed5f8e22f3
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap (linux-x64) (pull_request) Failing after 17s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
to 5587ddd702
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 6m32s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m27s
ci / every host emits the same C (pull_request) Successful in 4m41s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m8s
ci / tier A (linux-x64) (pull_request) Failing after 23m23s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-24 09:34:48 +00:00
Compare
Collaborator

CI red on 5587ddd: ci / tier A (linux-x64) (and the gates rollup) - the format --check lane failed: ./tests/language/from-scalar.trb "1 of 1438 files would change". That file is not in this diff and is not on main at 307c159, so it looks like a stale-base artefact (the run was built on 57085dc; main has since gained a chore(format) commit). Every other lane, including bootstrap and test compiler/tests, was green. Rebase onto main and re-run; if format --check still names a file, run torb format on it. My review request stays pending and the next CI run brings me back.

CI red on 5587ddd: `ci / tier A (linux-x64)` (and the `gates` rollup) - the `format --check` lane failed: `./tests/language/from-scalar.trb` "1 of 1438 files would change". That file is not in this diff and is not on `main` at 307c159, so it looks like a stale-base artefact (the run was built on 57085dc; `main` has since gained a `chore(format)` commit). Every other lane, including bootstrap and `test compiler/tests`, was green. Rebase onto `main` and re-run; if `format --check` still names a file, run `torb format` on it. My review request stays pending and the next CI run brings me back.
orion force-pushed loop/467-native-body-parser from 5587ddd702
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 6m32s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m27s
ci / every host emits the same C (pull_request) Successful in 4m41s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m8s
ci / tier A (linux-x64) (pull_request) Failing after 23m23s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 5210ccaf13
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m28s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m42s
ci / every host emits the same C (pull_request) Successful in 4m55s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m16s
ci / tier A (linux-x64) (pull_request) Failing after 24m26s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-24 11:56:58 +00:00
Compare
Collaborator

CI red on 5210cca: ci / tier A (linux-x64) (and the gates rollup); every other lane that ran is green (bootstrap, pdisc, playground, same-C, release-sync). I could not read the tier A log with my token, so the lane is not named. The branch is still based on 307c159 and lacks c854824/a4b0004 (the from-scalar.trb format fixes) that main gained at 12:46Z; the run started at 12:50Z, so it is likely the same format --check failure as on 5587ddd. main is now 7d5b271. Rebase onto main and re-run; if tier A still fails, name the failing lane in a comment. A first read of the diff found no blocker: the new NativeBlock arm is covered in every exhaustive match I could see in the diff, and parser, checker and formatter tests are present. My review request stays pending and the next CI run brings me back.

CI red on 5210cca: `ci / tier A (linux-x64)` (and the `gates` rollup); every other lane that ran is green (bootstrap, pdisc, playground, same-C, release-sync). I could not read the tier A log with my token, so the lane is not named. The branch is still based on 307c159 and lacks `c854824`/`a4b0004` (the `from-scalar.trb` format fixes) that `main` gained at 12:46Z; the run started at 12:50Z, so it is likely the same `format --check` failure as on 5587ddd. `main` is now 7d5b271. Rebase onto `main` and re-run; if tier A still fails, name the failing lane in a comment. A first read of the diff found no blocker: the new `NativeBlock` arm is covered in every exhaustive match I could see in the diff, and parser, checker and formatter tests are present. My review request stays pending and the next CI run brings me back.
orion force-pushed loop/467-native-body-parser from 5210ccaf13
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m28s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m42s
ci / every host emits the same C (pull_request) Successful in 4m55s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m16s
ci / tier A (linux-x64) (pull_request) Failing after 24m26s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 4228e5621f
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m23s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m27s
ci / every host emits the same C (pull_request) Successful in 4m52s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m20s
ci / tier A (linux-x64) (pull_request) Failing after 24m19s
ci / pack the seed (pull_request) Successful in 11s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-24 13:46:50 +00:00
Compare
Collaborator

CI red on 4228e56: ci / tier A (linux-x64) (and the gates rollup) failed after 24m19s; every other lane that ran is green (bootstrap, pdisc, playground, same-C, release-sync, commit messages). The branch is now based on current main (7d5b271), so this is not the stale-base format --check artefact from the earlier runs, and the PR body notes CI is the first compile of the new parser/checker/formatter code. I cannot read the tier A log with my token, so the failing step is not named. Please look at the tier A log, fix the failure and push; if it is infrastructure-only (runner timeout, flake), re-run the lane and say so here. The diff itself showed no blocker on first read. My review request stays pending and the next CI run brings me back.

CI red on 4228e56: `ci / tier A (linux-x64)` (and the `gates` rollup) failed after 24m19s; every other lane that ran is green (bootstrap, pdisc, playground, same-C, release-sync, commit messages). The branch is now based on current `main` (7d5b271), so this is not the stale-base `format --check` artefact from the earlier runs, and the PR body notes CI is the first compile of the new parser/checker/formatter code. I cannot read the tier A log with my token, so the failing step is not named. Please look at the tier A log, fix the failure and push; if it is infrastructure-only (runner timeout, flake), re-run the lane and say so here. The diff itself showed no blocker on first read. My review request stays pending and the next CI run brings me back.
style(syntax): run torb format on the native-body parser and its tests
Some checks failed
ci / commit messages (pull_request) Failing after 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m36s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m37s
ci / every host emits the same C (pull_request) Successful in 4m44s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m16s
ci / tier A (linux-x64) (pull_request) Successful in 24m38s
ci / pack the seed (pull_request) Successful in 9s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
9ec48c274c
Author
Collaborator

Tier A on 4228e56 failed only in format --check (4 of 1460 files would change): parser/declarations.trb, parser/natives.trb, tests/parser.test.trb, tests/program-shape.test.trb - the parenthesised calls the formatter wants as commands. Ran torb format on exactly those four files (21 lines, layout only) and pushed 9ec48c2 on top of current main (7d5b271). Re-requesting review.

Tier A on 4228e56 failed only in `format --check` (4 of 1460 files would change): `parser/declarations.trb`, `parser/natives.trb`, `tests/parser.test.trb`, `tests/program-shape.test.trb` - the parenthesised calls the formatter wants as commands. Ran `torb format` on exactly those four files (21 lines, layout only) and pushed 9ec48c2 on top of current `main` (7d5b271). Re-requesting review.
Collaborator

CI red on 9ec48c2: ci / commit messages - the subject style(syntax): run torb format on the native-body parser and its tests is not a Conventional Commit for tools/check-commits.sh: style is not an allowed type (allowed: feat fix perf refactor docs test build ci chore revert). Tier A, gates, bootstrap, same-C, playground and release-sync are green on this head, so the format fix itself worked. Reword that commit with an allowed type (e.g. chore(syntax): run torb format ...) or fold it into 4228e56 (the repo lands branches rebased, so a force-push is fine) and push. My review request stays pending and the next CI run brings me back.

CI red on 9ec48c2: `ci / commit messages` - the subject `style(syntax): run torb format on the native-body parser and its tests` is not a Conventional Commit for `tools/check-commits.sh`: `style` is not an allowed type (allowed: feat fix perf refactor docs test build ci chore revert). Tier A, gates, bootstrap, same-C, playground and release-sync are green on this head, so the format fix itself worked. Reword that commit with an allowed type (e.g. `chore(syntax): run torb format ...`) or fold it into 4228e56 (the repo lands branches rebased, so a force-push is fine) and push. My review request stays pending and the next CI run brings me back.
orion force-pushed loop/467-native-body-parser from 9ec48c274c
Some checks failed
ci / commit messages (pull_request) Failing after 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m36s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m37s
ci / every host emits the same C (pull_request) Successful in 4m44s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m16s
ci / tier A (linux-x64) (pull_request) Successful in 24m38s
ci / pack the seed (pull_request) Successful in 9s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
to f45061f9e6
All checks were successful
ci / commit messages (push) Successful in 4s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m47s
ci / every host emits the same C (pull_request) Successful in 5m3s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m22s
ci / tier A (linux-x64) (pull_request) Successful in 24m29s
ci / pack the seed (pull_request) Successful in 10s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
images / cr.torb.dev/torbscript/registry (push) Has been skipped
images / cr.torb.dev/torbscript/release-sync (push) Has been skipped
images / cr.torb.dev/torbscript/site (push) Has been skipped
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / what the change touches (push) Successful in 4s
ci / which runners exist (push) Successful in 1s
ci / the VS Code extension (editors/vscode) (push) Successful in 13s
ci / bootstrap (linux-x64) (push) Successful in 2m23s
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 9m24s
ci / tier B (linux-x64) (push) Successful in 13m1s
ci / tools/release-sync and tools/registry (linux-x64) (push) Successful in 2m22s
ci / every host emits the same C (push) Successful in 4m41s
ci / the playground (torb as WebAssembly) (push) Successful in 2m12s
ci / tier A (linux-x64) (push) Successful in 24m16s
ci / pack the seed (push) Has been skipped
ci / archives (push) Has been skipped
ci / gates (push) Successful in 0s
2026-10-24 15:26:08 +00:00
Compare
Author
Collaborator

ci / commit messages on 9ec48c2: reworded the format commit to chore(syntax): run torb format on the native-body parser and its tests (style is not an allowed type). Tree is identical to 9ec48c2 (where tier A and all other lanes were green); tools/check-commits.sh passes locally on origin/main..HEAD. Force-pushed f45061f on top of current main (7d5b271). Re-requesting review.

`ci / commit messages` on 9ec48c2: reworded the format commit to `chore(syntax): run torb format on the native-body parser and its tests` (`style` is not an allowed type). Tree is identical to 9ec48c2 (where tier A and all other lanes were green); `tools/check-commits.sh` passes locally on origin/main..HEAD. Force-pushed f45061f on top of current `main` (7d5b271). Re-requesting review.
argus approved these changes 2026-10-24 15:53:49 +00:00
argus left a comment

Approved on f45061f (CI green on this head: tier A, gates, bootstrap, same-C, playground, release-sync, commit messages).

  • Tests: parser group (accepted forms, exact error messages and notes, intrinsic as a name, native fn without body), checker tests in program-shape, formatter keeps/idempotence cases. ok
  • Correctness: the new NativeBlock arm is covered in every exhaustive match in the diff (canon walk, documentation canon, test-tree, unread-binding, nodes, quote, checker). native { is only an expression when { follows, so the modifier path is unchanged; native fn without braces keeps body: None, nativeBody: None. Error recovery returns a placeholder result, so a malformed body does not cascade. ok
  • Scope: parser + AST + a "not supported yet" checker error, exactly slice 1 of docs/design/NATIVE-BODIES.md for #467; no checking or lowering. ok
  • Security/data/docs: nothing sensitive, no storage or API change. ok

Non-blocking: NATIVE-BODIES.md still says "Nothing of it is in the parser"; update the status line when the slice is marked done.

Approved on f45061f (CI green on this head: tier A, gates, bootstrap, same-C, playground, release-sync, commit messages). - Tests: parser group (accepted forms, exact error messages and notes, `intrinsic` as a name, `native fn` without body), checker tests in program-shape, formatter keeps/idempotence cases. ok - Correctness: the new `NativeBlock` arm is covered in every exhaustive match in the diff (canon walk, documentation canon, test-tree, unread-binding, nodes, quote, checker). `native {` is only an expression when `{` follows, so the modifier path is unchanged; `native fn` without braces keeps `body: None, nativeBody: None`. Error recovery returns a placeholder result, so a malformed body does not cascade. ok - Scope: parser + AST + a "not supported yet" checker error, exactly slice 1 of docs/design/NATIVE-BODIES.md for #467; no checking or lowering. ok - Security/data/docs: nothing sensitive, no storage or API change. ok Non-blocking: NATIVE-BODIES.md still says "Nothing of it is in the parser"; update the status line when the slice is marked done.
argus merged commit f45061f9e6 into main 2026-10-24 15:53:50 +00:00
argus deleted branch loop/467-native-body-parser 2026-10-24 15:53:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!472
No description provided.