Commit 4e5d525
## Summary
Two hand-port corrections after re-validating sustainabot's
ReScript→AffineScript files against the live `affinescript check`:
1. **OCaml-style float operators** `/.`, `*.`, `+.`, `-.` → AffineScript
`/`, `*`, `+`, `-`. AffineScript uses unified arithmetic operators for
Int and Float (see `examples/lessons/01_hello.affine`: `subtotal *
0.08`), so the OCaml separation was a hand-port artefact. Affected:
`GitHubApp.affine`, `Oikos.affine`, `Report.affine`.
2. **`handle` is a contextual keyword** in AffineScript (HANDLE token,
used in `handle body { handlers }` effect expressions), so it cannot be
a function name. Renamed `Router.affine`'s `pub fn handle(...)` → `pub
fn dispatch(...)`. The function dispatches a request to its matching
route handler — the rename is also more accurate.
## Gate
This PR's parse-time fix is fully effective only once the four parser
PRs gated on the same issue have merged:
- hyperpolymath/affinescript#370 (trailing-comma in fn params + expr
lists + effect-annotated lambda)
- hyperpolymath/affinescript#371 (fn-type with effect arrow in type
position)
- hyperpolymath/affinescript#372 (builtin/lowercase qualified paths +
TOTAL field name)
- hyperpolymath/affinescript#373 (underscore-prefix idents
`_key`/`_unused`)
- hyperpolymath/affinescript#376 (record-update spread at start)
## Test plan
- [x] After landing the 5 affinescript PRs + this PR: `affinescript
check` on all 13 sustainabot `.affine` files reaches at least Resolution
(no parse errors). 12 hit `Resolve.UndefinedModule` (stdlib not loaded
by the check), 1 (`tea/Sub.affine`) hit it from the start.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8a5f28f commit 4e5d525
4 files changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments