frontend: provide contextual source repair advice
This commit is contained in:
1 parent
008867fe48
commit
2c6c7a3dcd
37 files changed
+562
-24
No files matched your search
@@ -4,6 +4,21 @@ Read this first; it covers most programs. Where to find the full rules is at the
|
||||
|
||||
Aji makes every significant action explicit — moves, borrows, allocation, closing, authority, effects, tasks, channel transfers, locking, cancellation, every failure outcome — and checks them all before running. The compiler writes the mechanics: SSA, control flow, borrow ends, frame storage, the feature header.
|
||||
|
||||
**If you know Rust:** use these Aji spellings. Rejected familiar syntax may carry a `repair_candidates` hint; cast alternatives require your choice.
|
||||
|
||||
| Familiar spelling | Aji |
|
||||
|---|---|
|
||||
| `!condition` | `not condition` (boolean negation) |
|
||||
| a narrowing `x as T` | `x as! T` checks/traps; `x as% T` wraps |
|
||||
| `let mut x = value` / `var x = value` | `var x: T = value;` (type required) |
|
||||
| immutable `let x = value` | `let x = value;` (type may be inferred) |
|
||||
| mutable/shared slice type | `slice_mut<T>` / `slice<T>` |
|
||||
| `s[start..]` | `s[start..end]` (explicit upper bound) |
|
||||
| `f(&x)` / `f(&mut x)` | `f(ref x)` / `f(mut x)` |
|
||||
| `let r = &x` / `let r = &mut x` | `ref r = x;` / `mut r = x;` |
|
||||
| `[zero; N]` | `var storage: [T; N] = zero;` (zeroable T) |
|
||||
| `-> ()` / implicit effects | `-> void effects [...]` |
|
||||
|
||||
## 1. Skeleton
|
||||
|
||||
```aji
|
||||
|
||||
Reference in new issue
Block a user