Commit 7ffe561
committed
autotranslate: address BR's agent-supported review (#958)
1. (correctness) REPL result-echo classifier is now Unicode-aware: the pattern
`(val|var)\s+\w+:.*=.*` gained a `(?U)` prefix so `\w` matches åäö. Without it,
`var räknaLäte: Int = 0` (SV) was NOT classified as output while its rename
`var callCount: Int = 0` (EN) was — breaking the SV/EN classification symmetry
that guarantees a mis-split can only skip, never false-flag. Verified: the SV
line now classifies as output (was false), and a REPL fixture carrying that
echo line self-compiles (ok) instead of self-skipping on a duplicate var.
2. Phase-1 regression entries now include the line number (file:line (env)), like
phase-2 — the regression list is the one a maintainer must act on.
3. Latex.ifswedishRanges warns on stderr when a range runs to EOF (unbalanced
\ifswedish, e.g. a stray one in a comment/verbatim) — conservative already
(skip, never mistranslate) but now visible.
4. ifswedishRanges returns a named tuple Seq[(start: Int, end: Int)]; call sites
(Translate + the gate) read r.start/r.end instead of positional (a, b).
5. Refreshed the gate's usage header (root is optional, --list documented).
6. Noted the per-file scaffold duplication across the three loops is deliberate
for a scratch tool (a shared HOF helper would add more indirection than it saves).
Item 7 (option-line stripping asymmetry) left as-is per the review — Code/CodeSmall
don't take optional args, so no change needed. Main project + gate both compile.1 parent 283ba80 commit 7ffe561
3 files changed
Lines changed: 27 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
| 671 | + | |
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
| 683 | + | |
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | | - | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| |||
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
115 | | - | |
116 | | - | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| |||
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
147 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| |||
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
163 | | - | |
| 171 | + | |
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
| |||
0 commit comments