Repository navigation
Commit e4258bc
Give ntVariable an end position
Same gap as the previous commit, same shape of fix. A variable declaration
produced a node positioned at its name with no end at all, so a declaration
whose type or initialiser spans lines reported only its first line:
var
Grid: array[0..1] of
Integer;
VarDeclaration pushed ntVariables with FStack.Push, so the VarList that
RearrangeVarSection rebuilds each variable from had no extent to pass on.
Both now push compound nodes, and the rebuilt ntVariable inherits the end
via AssignEndPositionFrom - the second caller for the helper added in the
previous commit, which is the pattern it exists for.
The compound ntVariables nodes are the throwaway VarSect children that
VarSection frees, so the output footprint matches the constant change
exactly: VARIABLE gains begin/end, and the VARIABLES section node that
reaches the tree is untouched.
Names sharing one line (`A, B: Integer;`) each get the declaration's extent,
which is the whole declaration they share.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 378d904 commit e4258bc
2 files changed
Lines changed: 39 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3210 | 3210 | | |
3211 | 3211 | | |
3212 | 3212 | | |
3213 | | - | |
| 3213 | + | |
| 3214 | + | |
3214 | 3215 | | |
3215 | 3216 | | |
| 3217 | + | |
3216 | 3218 | | |
3217 | 3219 | | |
3218 | 3220 | | |
| |||
3303 | 3305 | | |
3304 | 3306 | | |
3305 | 3307 | | |
3306 | | - | |
| 3308 | + | |
| 3309 | + | |
3307 | 3310 | | |
3308 | 3311 | | |
| 3312 | + | |
| 3313 | + | |
3309 | 3314 | | |
3310 | 3315 | | |
3311 | 3316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
213 | 244 | | |
214 | 245 | | |
215 | 246 | | |
| |||
263 | 294 | | |
264 | 295 | | |
265 | 296 | | |
| 297 | + | |
266 | 298 | | |
267 | 299 | | |
268 | 300 | | |
| |||
0 commit comments